www.webdeveloper.com
Results 1 to 4 of 4

Thread: line problems

  1. #1
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197

    line problems

    I attached the below to a div and the line displays correctly in Firefox but ie make the height higher then it should any ideas why

    Code:
    .rule {
    	margin:0;
    	padding:0;
    	height:3px;
    	margin-bottom:8px;
    	background-color: #EFF7C0;
     
    }
    Last edited by WebJoel; 08-25-2007 at 06:35 PM.
    Kevin

  2. #2
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    IE4-6/Win won't let an element have a height that is less than its line-height. To fix this you can decrease the font-size and line-height OR use overflow:hidden.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

    Check out my blog.

  3. #3
    Join Date
    Jul 2007
    Posts
    113
    One solution is to zero out your margins and padding at a higher level using something like:

    body * {marign: 0; padding:0; }

    Of course if you do that you will have to reset all attributes for all elements. That's not as bad as it sounds. Do it well once then you can reuse the new stylesheet as a basis for all later projects. Look at Yahoo User Interface, Mollio and Blueprint for some well thought out and completer examples.
    Last edited by WebJoel; 08-25-2007 at 06:34 PM. Reason: replaced "(" and ")" with "{" and "}" for "body * {marign: 0; padding:0;}"

  4. #4
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197
    thank you for the help. I got it working
    Kevin

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles