in IE, it looks right, but in FF some of the background-images are not showing. I have a background-image repeating-y in the CONTAINER/WRAPPER div. I have several DIVs inside of the CONTAINER div. here are the files
FYI
* My screen resolution is set at 1680x1050
* I'm accessing your site through a T1 line
* I'm probably viewing it using Firefox (unless browser is specified)
Looks like you need to clear the columns in your content area. The div has nothing but floated content so it has no height. Try this and you'll see what I mean.
Code:
#container {
width:768px;height:400px;
...
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Reading the forum post that I linked to with "Quick Floated Elements Explanation" tells you why and also gives a solution. It's a link in my signature.
yes, the correct syntax is that. i was just abbreviating for simplicity's sake. here the complete code of my simplified model:
<div id="container" style="background-image:url(image.gif); repeat:repeat-y;">
<div id="nav" style="height:100px; float:left;"></div>
<div id="content" style="height:300px; float:right; clear:right"></div>
</div>
as mentioned before, this code shows the CONTAINER background-image through the NAV and CONTENT divs in Internet Explorer but not in FireFox.
yes, the correct syntax is that. i was just abbreviating for simplicity's sake. here the complete code of my simplified model:
<div id="container" style="background-image:url(image.gif); repeat:repeat-y;">
<div id="nav" style="height:100px; float:left;"></div>
<div id="content" style="height:300px; float:right; clear:right"></div>
</div>
as mentioned before, this code shows the CONTAINER background-image through the NAV and CONTENT divs in Internet Explorer but not in FireFox.
Oh okay! I am quite, um, literal. So when I see a mispelled word in someone's example code, I assume that THAT is the problem. Personal shortcoming: I loathe 'AOL shorthand'... you know, "how r u? I am gr8!"
Anyway, I think that IE only allows 'background-image' to be declared on the 'body', whereas compliant browsers (e.g. any non-IE) allow background-image to also be declared upon things like DIV's. There is an example of this here http://www.meyerweb.com/eric/css/edg...lexspiral/demo That is more of a 'background-attachement:fixed' situation, -but it may be related to what you're experiencing...
This URL's example works beautifully in all/most browsers, notably is the exception of IE of course.
Have you tried taking the style="background-image:url(image.gif); repeat:repeat-y;" off of the DIV and putting it into the STYLE declaration #container {foo}? Oddly enough, I have seen cases where a 'id="this" style="foo:foo-foo"' failed, but adding the style= stuff to the '#this' id worked....
as mentioned before, this code shows the CONTAINER background-image through the NAV and CONTENT divs in Internet Explorer but not in FireFox.
That's because IE incorrectly allows the floated content to expand the containing div. That's why you have to put a "clearing div" below the floated divs before closing out the container.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Ray-
you're the man! this is an issue that has had me:
1. pulling my hair out
2. considering dumping this CSS bull**** and go back to tables (just kidding, i love CSS)
3. contemplating a career change.
it seams also that the last floated DIV cannot have the float:left in the attributes either (if the only element on that level).
Bookmarks