danielcopelandnz56
New Member
- Messages
- 9
- Reaction score
- 0
- Points
- 0
On one of my pages, I have a background image with an empty <div> over the top of it; the empty <div> is a partly-transparent white background for the text <div>. I can't put the text inside the empty <div>, because then the text is partly transparent as well.
The problem I'm having is that, although the text and background <div>s have exactly the same positioning and size CSS, the text sticks out of the white background on the right-hand side. Here is the code:
And, to be clear, the <div id='content'> is outside the <div id='whitebox'> and comes after it on the webpage.
The problem occurs in Firefox. It did not occur in IE until I put a doctype declaration on the HTML page -- but now it does.
I've had this problem a few times. In the past I've quietly changed the design so as not to have to worry about it, but this is no longer an option.
The problem I'm having is that, although the text and background <div>s have exactly the same positioning and size CSS, the text sticks out of the white background on the right-hand side. Here is the code:
Code:
#whitebox {
position : absolute;
width : 83.333%;
left : 8.333%;
height : 100%;
background-color : #ffffff;
opacity : 0.66667;
filter : Alpha(opacity=66.667);
}
#content {
position : absolute;
width : 83.333%;
left : 8.333%;
height : 100%;
padding : 1em;
}
The problem occurs in Firefox. It did not occur in IE until I put a doctype declaration on the HTML page -- but now it does.
I've had this problem a few times. In the past I've quietly changed the design so as not to have to worry about it, but this is no longer an option.