I'm doing the xhtml/css for a friend's website. He's a graphic designer, himself, so the design he proposed is clean, simple, and pretty streamlined. Simple enough. Or so I thought.
The most current problem I resolved was that my navbar was bullying my main window, taking up the remainder of the container instead of being the fixed width that it had been assigned, which pushed the main window down below the navbar.
You can see the problem above. This was all very confusing and it started happening when I brought iframes into the equation, although iframes had nothing to do with it (multitasking...sometimes it's not your friend). I knew that the css had to be buggy, but I couldn't figure out how. I did the basic scan of open brackets, missing semi-colons...all of it checked out:
#navbar {After an hour of using firebug, gnashing my teeth, and not seeing anything helpful, I added this, practically on a whim:
position: relative;
display: inline;
margin: 0;
padding: 0;
width: 90px;
height: auto;
background: #ffffff;
}
#navbar {It worked! I remember facing this problem with the index page of my own website, and as you can imagine, it's really frustrating to have spent an hour banging my head against the wall before that simple no-brainer solution finally started to come into focus. Especially on a project with a fixed budget.
float: left;
position: relative;
display: inline;
margin: 0;
padding: 0;
width: 90px;
height: auto;
background: #ffffff;
}
Now. Onto iframes.
(design by tim gentle)
No comments:
Post a Comment