css not aligning right...

Ok. Here's the problem. I want a long banner across the page consisting of
two equally sized (heightwise) "banners", so it looks like one huge banner
across the center of the webpage.
On the FIRST load, it misaligns by like 5 pixels. Then on refresh or window
resize, and from then on, it lines up perfectly. I think percentage is the
best method, so that with all resolutions/screen sizes it stays in the
center... Any suggestions?
THanks. Here is the code consisting of two <DIV>'s in the html:

Advertisements

you didn't supply a URL which is another problem
> I want a long banner across the page consisting of two equally sized
> (heightwise) "banners", so it looks like one huge banner across the
> center of the webpage.

<div><img ... height="20"><img ... height="20"></div>

simple
> Here is the code consisting of two <DIV>'s in the html:
> <IMG CLASS="frontFireImage" SRC="Images/Fire1.gif">
> <DIV CLASS="frontWhiteBox">&nbsp;</DIV>

thats not two <div>s. its one invalid <img> and one empty <div>

if you supplied a URL i could have whipped up the necessary css/html in
a few seconds.
> .frontFireImage { position:absolute; top:40%; left:-15px; }
> .frontWhiteBox { background-color:gray; position:absolute; top:40%;
> left:450px; height:110px; width:700px; }

Advertisements

: Ok. Here's the problem. I want a long banner across the page consisting of
: two equally sized (heightwise) "banners", so it looks like one huge banner
: across the center of the webpage.
: On the FIRST load, it misaligns by like 5 pixels.

Use a table. I would. Forget the new wave of thinking.

Tables with cellspacing and cellpadding set to zero is your god friend.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!