SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member simpletex's Avatar
    Join Date
    Feb 2003
    Location
    Texas, USA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE and Netscape positioning squabble

    Help! Am I just stupid??!!!

    I'm trying to place a header over a 3-col layout, and it works fine except Netscape insists on creating a margin around it. If I use absolute positioning on the <div>, it works great in Netscape and kills everything in IE. Here's the CSS:

    #top {
    margin: 0px;
    background: #FFCC00;
    height: 82px;
    border-style: solid;
    border-color: black;
    border-width: 0px 0px 15px 0px;


    the absolute positioning I did like so:

    #top {
    position: absolute;
    top: 0px;
    right: 0px;
    left: 0px;
    background: #FFCC00;
    height: 82px;
    border-style: solid;
    border-color: black;
    border-width: 0px 0px 15px 0px;

    The HTML is literally just a div tag with the id="top".

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,295
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    The only version of netscape I've got is 6.2 and the above code seems to work on that ok. Is the border taht's showing just at the top of the screen? If it is then it just might be the new line that netscape produces when you use something like
    Code:
    <div id="top"><p>hello</p></div>
    You can get around it by setting margins to 0px or just leaving the <p> tag out of the first item in the div.

    e.g.
    Code:
    <div id="top">hello</div>

    In your second piece of code IE will need a width:100% before it will display the header.

    Hope this is of some use.

    Paul

  3. #3
    SitePoint Member simpletex's Avatar
    Join Date
    Feb 2003
    Location
    Texas, USA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    Hi,
    In your second piece of code IE will need a width:100% before it will display the header.
    Paul
    Jeez, you gotta be kiddin me! I can't believe I just sort of left that out! Brainfart... Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •