SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Maryland, USA
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    div widths in NN4

    All,

    I have a script which writes a div tag for a text based banner at the top of the page. something like this:

    Code:
    <div class="blueback">test</div>
    In the style I set the background color to blue, text color to yellow and the box width to 100%.

    The problem is that in NN4 I only get a box the size of the text that was typed in. While in IE I get the 100% width box. I would like to have them both 100% as it looks more consistent with the rest of the page. Any ideas on how to get NN4 whiped into shape?

    R

    Mike H.
    R
    MH

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Is there any reason you still have to work with NN4? I just tend to serve it a very plain stylesheet.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Maryland, USA
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Is there any reason you still have to work with NN4? I just tend to serve it a very plain stylesheet.
    Unfortunately, I am working on a large Intranet that still has a lot of NN4 being used on it. I end up supporting NN4+ and IE4+ Talk about making my head hurt. Due to the size it will probably take at least 3 more years before they have modernized all of it.

    That being said does anyone have any ideas on how this can be done?

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Try placing the style inline (in the <div>'s "style" attribute), which seems to work a little more reliably in NN4.

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Maryland, USA
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Try placing the style inline (in the <div>'s "style" attribute), which seems to work a little more reliably in NN4.
    Nice thought, however no joy. The width attribute of the div is totally ignored by NN4....

  6. #6
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Maryland, USA
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Ok I was finally able to find a solution. It seems that I had to add border: none; to the style and poof!!! Netscape made my div wider...not quite the same as it is in IE but close enuf for government work!


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
  •