SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Guru
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    background problem in ie6

    Hi,

    I wanted to have a horizontal line using div.horz

    the css is like this:

    Code CSS:
    .horz {
    	height:1px;
    	background:#c7c7c7;
    	width:543px;
            font-size:100$; /*inherit from global set */
            margin:0; /*inherit from global set */
            padding:0; /*inherit from global set */
    }

    in ie6 the div's height is like 10 pixel, which is not expected, I expect 1px.

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,621
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    In IE6 it won't render an element with a height less then the font-size. To prevent this add overflow:hidden; to it. (Or set font-size:1px)
    Always looking for web design/development work.
    Willing to do it cheap to build portfolio!

  3. #3
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and add line-height:0px; along with font-size:0px; and overflow:hidden;

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,621
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Forgot to add that...though I would incidentally recommend overflow:hidden; (not to take off of your remark Chris)
    Always looking for web design/development work.
    Willing to do it cheap to build portfolio!

  5. #5
    SitePoint Guru
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh thanks

  6. #6
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,621
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Your welcome . If you have any more questions just ask.
    Off Topic:

    Which method did you choose
    Always looking for web design/development work.
    Willing to do it cheap to build portfolio!

  7. #7
    SitePoint Guru
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    overflown


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
  •