Mark Johnson

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMark Johnson
ToMe
Subjectcss problems
Date24 March 2004 08:41
Attachmentfile with css that does not work cross browser
Ahoy, matey!
 
When you have a minute, can you take a look at the attached file and tell
me how to get the same results I get in IE with Netscape6?  (I realise it's
not the best piece of coding, btw...just trying to make a nice looking page)
 
I know NS has it's bugs, but I figure you'll know them off by heart anyhow.
 
Cheers
Mark
FromMe
ToMark Johnson
SubjectRe: css problems
Date24 March 2004 09:10
Mark,

bad dog! NS6 does not have bugs, IE has bugs :P

'A' elements are inline and cannot have height and width unless you set
display: block; (that's in the standard, so don't blame NS6)

The gaps will always be different with some browsers because of various box
models:
IE/opera(quirks) => width = width of content + paddings + borders
W3C/NS6/opera(strict)/Safari => width = width of content

Opera and NS6 allow you to change box models to the IE one.
 box-sizing: border-box;
 -moz-box-sizing: border-box;
Safari will never use the IE box model

Your DIVs needs a top and left position specified ;)
don't rely on defaults, because some browsers use main content padding to
work out defaults and some don't.
Don't use margins on them to position them, they are absolutely positioned,
so margins should have no effect according to the standard. use
left: blah; top:blah;
FromMark Johnson
ToMe
SubjectRe: css problems
Date24 March 2004 09:39
Sorry, bad choice of words. You're quite right, NS follows the standard
better. IE is just better at guessing when I don't use it :-)

Thanks for the help, anyway...your changes worked fine.

Cheers
Mark
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.