css not aligning right...

D

D R E

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:

<IMG CLASS="frontFireImage" SRC="Images/Fire1.gif">
<DIV CLASS="frontWhiteBox">&nbsp;</DIV>

HERE is the code in the CSS.

..frontFireImage { position:absolute; top:40%; left:-15px; }
..frontWhiteBox { background-color:gray; position:absolute; top:40%;
left:450px; height:110px; width:700px; }
 
B

brucie

in post: <
D R E said:
Ok. Here's the problem.

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; }

that looks overly complicated
 
S

Sid Ismail

: 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.

Sid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top