It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

thickness of lines

thickness of lines

Postby dazz_club on Tue Aug 15, 2006 12:34 pm

hi guys, i know browsers interpret css in their own unique way,

so heres my question, ive got height set at 2px, firefox fine,ie no good, wheres the middle ground between these two browsers? whats best to please them both?

should i be using something else other than px for this matter?

cheers

ie presents the thickness, well alot thicker compared to firefox
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull

Postby johneva on Tue Aug 15, 2006 2:07 pm

Not sure why your having problems in this particular situation, but there are a couple of way of getting around your CSS being interprated diffrently by IE and other W3C standards compliant browsers.

There is this way.
Code: Select all
#leftnav {
      width: 130px;
      _width: 140px;
}


Problem with doing it this way is the code is not valid and wont pass W3C CSS validation.

Or you can make seperate CSS files one for IE and one for the rest and use conditional comments in your head section so it uses the right file.

Here is an article about the couple of options with IE hacks.

I have also used this before.
Code: Select all
#leftnav {
      float: left;
      width: 130px;
      margin-top: 10px;
      margin-left: 5px;
      padding-top: 1em;    
}

html>body #leftnav {
      padding-left: 5px;
}


Which works well and is valid.
Image
Only God Can Judge Me.
User avatar
johneva
500+ Club
 
Posts: 565
Joined: Sat Oct 29, 2005 1:16 pm
Location: Stafford, England

Postby dazz_club on Tue Aug 15, 2006 3:52 pm

hmmm,

i think i might have to with two style sheets with this one...

heres the code if it helps
Code: Select all
#yellow_line_links{
height:3px;
width:100%;
background-color:#FFFF00;
margin-top:5px;


cheers again
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull


Who is online

Users browsing this forum: No registered users and 0 guests