CSS Alignment of DIV's problem

Discussion in 'HTML' started by rfq, Sep 2, 2004.

  1. rfq

    rfq Guest

    I am just getting started on html and css. I have a very simple page.
    There is a jpg image at the top of the page that is aligned left. Then
    there are two DIV's created, the main div and a right hand navigation
    bar div. I am having trouble getting the tops of both divs to align. I
    can adjust the top margins for each div to render as aligned in Opera7
    but then IE6 shows the main div slightly lower than the nav div. If I
    adjust it to render in IE6 then it throws the Opera rendering off.

    My HTML file places the image first and then lists the divs. I am
    using relative positioning in the CSS file for these divs. Should I
    use absolute positioning or am I missing something simple? Should I
    nest the two divs inside one larger div?

    Thanks,

    RQ
    rfq, Sep 2, 2004
    #1
    1. Advertising

  2. rfq

    Neal Guest

    On 2 Sep 2004 07:23:16 -0700, rfq <> wrote:

    > I am just getting started on html and css. I have a very simple page.
    > There is a jpg image at the top of the page that is aligned left. Then
    > there are two DIV's created, the main div and a right hand navigation
    > bar div. I am having trouble getting the tops of both divs to align. I
    > can adjust the top margins for each div to render as aligned in Opera7
    > but then IE6 shows the main div slightly lower than the nav div. If I
    > adjust it to render in IE6 then it throws the Opera rendering off.
    >
    > My HTML file places the image first and then lists the divs. I am
    > using relative positioning in the CSS file for these divs. Should I
    > use absolute positioning or am I missing something simple? Should I
    > nest the two divs inside one larger div?


    This will require a URL for an example to get competent advice.
    Neal, Sep 2, 2004
    #2
    1. Advertising

  3. rfq

    WebcastMaker Guest

    In article <>,
    says...
    > I am just getting started on html and css. I have a very simple page..


    So simple that it lacks a URL
    --
    WebcastMaker
    Webcasting for free
    http://www.webentations.com
    WebcastMaker, Sep 3, 2004
    #3
  4. rfq

    rfq Guest

    WebcastMaker <> wrote in message news:<>...
    > In article <>,
    > says...
    > > I am just getting started on html and css. I have a very simple page..

    >
    > So simple that it lacks a URL



    Actually yes sort of. I'm building it locally to replace my current
    (and first) Frontpage mess at http://home.primus.ca/~rico.jd

    I'm following my usual 'jack of all trades - master of none' behaviour
    and am learning html and css from scratch while I do it and I haven't
    really had the chance to upload it yet.

    Since my original posting, I was able to solve the problem by putting
    the header image into its own div container. Is there a performance
    difference between putting the image in a div at the top vs. putting
    it as a background image for the body element itself? There will be a
    similar images on many pages in the site.

    Advice taken however, and before posting another question (of which
    there will undoubtedly be several) I will make sure to get it online
    and post the link with my question.

    Thanks for your responses.

    RQ
    rfq, Sep 3, 2004
    #4
    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. Some One
    Replies:
    5
    Views:
    807
    Toby A Inkster
    Aug 9, 2003
  2. Slick50
    Replies:
    2
    Views:
    458
    dorayme
    Dec 3, 2006
  3. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    737
  4. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    182
    David Dorward
    Jun 1, 2005
  5. mscir
    Replies:
    3
    Views:
    302
    Martin Honnen
    Jun 26, 2005
Loading...

Share This Page