1 px Horizontal rules

Discussion in 'ASP.NET / ASP.NET Core' started by Lee, Dec 29, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Lee

    Lee

    Howdy folks...

    This is something I am wondering about. I have a site with several horizontal rules in it. I have set them to be 1 pixel thick:

    <hr width="100%" size="1" noshade>

    They come out fine in Explorer, but in many other browsers, they come out much fatter -- like5 or6 pixels thick. Is there some other attribute that might work inNetscape, Opera, etc.?I tried a bunch of style things, like style="height:1px" and stuff like that, but nothing works.

    Thanks!

    ========================
    I used to believe in living ever day if it were my last, but then I ran out of clean clothes. Nobody does laundry on their last day.
     
  2. I'm not sure about the html-code, but another solution could be to use an image. Create an image of 1px by 1pxin the desired color. Then show it with 100% width. It will show up the same in all browsers ...


    If you create a transparent 1px * 1px image,you can use it to separate objects from each other, or to make sure a table cell takes the width you want.


    --
    Steurm
    www.steurm.net/steurm
    [​IMG]
     
  3. try <hr style="width:1px">


    or


    <hr style="height:1px">


    must be one of those 2, you are better off where possible to use style properties or CSS browsers tend to sometimes ignore the attributes in the tag, depending on the alignment of the moon and which way youre toes are pointing sometimes.
     
  4. Lee

    Lee

    Michael,

    Tried those -- neither one of those do the trick for Netscape, Opera, or Mozilla.

    Actually, Steurm's suggestion worked beautifully. I had no idea that you could even use a tag in an image file like width="100%", but it actually works in every browser I tried. So, I just replaced all my horizontal rules with a 1px by 1px imagein the desired color,shownat 100% width. Problem solved! [​IMG]

    Thanks all,

    ~ Lee
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page