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

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

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

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:
    4,680
    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:
    391
    Chris Harris
    Jul 17, 2003
  3. Jukka K. Korpela

    Re: (CSS) Aligning signed numbers in cells

    Jukka K. Korpela, Aug 10, 2003, in forum: HTML
    Replies:
    0
    Views:
    471
    Jukka K. Korpela
    Aug 10, 2003
  4. badstyle
    Replies:
    4
    Views:
    523
    badstyle
    Dec 18, 2003
  5. news.frontiernet.net
    Replies:
    6
    Views:
    1,107
    news.frontiernet.net
    Apr 16, 2004
Loading...

Share This Page