Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: CSS - width inconsistencies between browsers

date posted 1st February 2006 16:55

> #nav li a {
> font-family: Arial, Helvetica, sans-serif;
> font-size: 11px;
> width: 12.85em;
> w\idth : 13.85em;
> display : block;
> color : white;
> font-weight : normal;
> text-decoration : none;
> background-color : #3A7986;
> padding : 0 0.5em;
> }
>
>The CSS file is at http://www.mkuseating.co.uk/mainstyle.css
>
>Not sure how the hack works but I assume that 'w\idth' is supposed to be
ignored by certain browsers??

On IE, the width *includes* the padding, but on Safari/FireFox it excludes
it. Go figure!

There are lots of hacks around, but I find that this works OK:

width: 13.35em !important ;
width: 13.85em ;

Basically, IE ignores the !important attribute and Safari/FireFox don't. So,
the net result is that you can apply a smaller "important" width which takes
precedence for Safari etc and excludes the padding, and leave IE to use the
wider width which includes it. The difference between the 2 is usually the
sum of the left/right padding, but you may need to juggle numbers depending
on the rest of your CSS.

Hope that helps
Ed

www.emissary-consulting.co.uk



Messages by Day
February 28th 2006
February 27th 2006
February 26th 2006
February 25th 2006
February 24th 2006
February 23rd 2006
February 22nd 2006
February 21st 2006
February 20th 2006
February 19th 2006
February 18th 2006
February 17th 2006
February 16th 2006
February 15th 2006
February 14th 2006
February 13th 2006
February 12th 2006
February 11th 2006
February 10th 2006
February 9th 2006
February 8th 2006
February 7th 2006
February 6th 2006
February 5th 2006
February 4th 2006
February 3rd 2006
February 2nd 2006
February 1st 2006


Messages by Month
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000