On 09/12/09 19:47, andre petyan wrote:
> http://princesslimousine.net/
>
> okay i have this site i am working on
> the person that got me to do it is satisfied but i am not.
> i mean if i show this as a portfolio peace i will be laughed at
>
> what i wanted to do was add a border around everything to surround the main
> content.
> right now it looks like its just nice centered content flowing in the middle
> of the screen as separate information peaces.
>
> i want to add a 1 pixel border that is solid black and a new background layer.
> the new background is going to be an image of the driver helping someone into
> the car. i don't have the image yet
>
> here is what is bothering me.
> i have a transparency layer. i hate it i have very high opacity set because i
> need the text to be readable.
> all i wanted was to make the overall-background slightly more white so the
> background gradient wouldn't be disturbed or removed.
> now you can barley tell there is even opacity or if i lower the opacity the
> text is already bold so its harder to read.
>
> How can i make the background of the text/main content area more transparent
> without it effecting the stuff inside the transparent area?
>
I think I understand what your goal is. The problem is that the
contents of an element can't have a different opacity than the background.
A solution I came up with for your page was to use three DIVs: one for
the semi-opaque background, one containing the paragraphs (your
"transbox_h" DIV), and a third one wrapped around the other two. The
wrapper DIV has relative positioning and the two inner DIVs have
absolute positioning.
HTML
<td>
<div class="transbox_wrapper">
<div class="transbox_bg"> </div>
<div class="transbox_h">
<p>
Welcome to Princess Limousine!...</p>
</div>
</div>
</td>
CSS
div.transbox_h {
position: absolute;
top: 0;
left: 0;
width: 600px;
height: 230px;
margin: 0;
border: none;
}
div.transbox_bg {
width: 600px;
height: 230px;
background-color:#ffffff;
filter: alpha(opacity=45);
opacity: 0.45;
position: absolute;
top: 0;
left: 0;
}
div.transbox_wrapper {
width: 600px;
height: 230px;
position: relative;
}
It works because the element which has the opacity applied doesn't
contain the text. It's just behind it.
I used 45% opacity because I have bad eyes. You can switch it back to
85 if that's what you want :)
I gotta tell ya, though, I hate this solution. You're making it harder
by using tables for layout.
> also
>
> i tried this code and it isn't working and i have just for some reason gone
> silly and can't figure it out.
> i need a new background wrapping all the middle area from top to bottom that
> is also transparent letting the gradient in and not dulling anything out.
>
This sounds like sort of the same problem. You can probably apply the
same technique I described above.
> exaple
>
> |page 100% opacity | everything but the main content area 80% opacity with
> 100% opacity on content | main content area 40% opacity with 100% opacity on
> content | relative opposite side | relative opposite side |
>
> here is a chunk of code i got i don't know what i have wrong or what i am
> missing.
>
>
> body {font: 100% Verdana, Arial, Helvetica; background:
> url(images/f_grad.jpg) repeat-x; margin: 0; padding: 0; text-align: center;}
>
> .thrColAbsHdr #container {position: relative; width: 845px; margin: 0 auto;
> border: 0; text-align: left; border: 2px solid 000000;} //need to add BG
> image and tarns\\
>
> div.transbox_h {width: 600px; height: 230px; margin: 0;
> background-color:#ffffff; border: none; filter:alpha(opacity=85);
> opacity:0.85;} //need to remove the effect of the trans from content i only
> want to apply to BG\\
>
>
> David and as always thanks in advance. you guys always help me out a lot. i
> hope to be where you are one day.
>
--
*Ghodmode*
www.ghodmode.com <http://www.ghodmode.com>
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/