css not aligning right...

Discussion in 'HTML' started by D R E, Jul 9, 2004.

  1. D R E

    D R E Guest

    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; }
     
    D R E, Jul 9, 2004
    #1
    1. Advertisements

  2. D R E

    brucie Guest

    in post: <news:CooHc.15861$>
    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

    --
    b r u c i e
     
    brucie, Jul 9, 2004
    #2
    1. Advertisements

  3. D R E

    Sid Ismail Guest

    On Fri, 09 Jul 2004 03:36:02 GMT, "D R E" <> wrote:

    : 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
     
    Sid Ismail, Jul 9, 2004
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nemo
    Replies:
    1
    Views:
    5,004
    S. Justin Gengo
    Sep 16, 2005
  2. Sebastian Fey

    big CSS-trouble! aligning in listitem!

    Sebastian Fey, Jul 17, 2003, in forum: HTML
    Replies:
    6
    Views:
    589
    Chris Harris
    Jul 17, 2003
  3. badstyle
    Replies:
    4
    Views:
    669
    badstyle
    Dec 18, 2003
  4. news.frontiernet.net
    Replies:
    6
    Views:
    1,403
    news.frontiernet.net
    Apr 16, 2004
  5. TheStonge
    Replies:
    9
    Views:
    512
    Edwin van der Vaart
    May 24, 2004
  6. Gernot Frisch

    aligning with CSS

    Gernot Frisch, Mar 16, 2006, in forum: HTML
    Replies:
    4
    Views:
    529
    dorayme
    Mar 17, 2006
  7. haig

    aligning with css

    haig, Jul 18, 2006, in forum: HTML
    Replies:
    3
    Views:
    422
  8. jobs
    Replies:
    5
    Views:
    472
    dorayme
    May 26, 2007
Loading...