CSS and Browser Compatability

They have: 10 posts

Joined: Oct 2008

Hello I have some questions about CSS and browser compatbility. I am in the process of creating a site using Div style web site instead of standard table style. The tricky part of this is trying to get IE 6, IE 7 and Mozilla (FireFox) to render the site correctly. I have found the following CSS code for IE7 and Firefox
IE7
*:first-child+html body .

Firefox
x:-moz-any-link

1.How do I use this code?

***2. Or better yet how do I calculate the correct width for each browser since this will be used in the same style sheet?

3. Also is there another soltuion to solve this problem or a place where I can go to copy additional CSS code for browser?

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Can you show us what you have so far? You shouldn't have too many problems with widths in current versions of the browsers. It's really best to try to serve them all the same CSS as much as possible. Then you won't end up with too many maintenance problems in the future. Hacks like the ones you posted above should be avoided.

That said, conditional comments are a good way to serve different CSS to internet explorer.

If you want some pre-made layouts to choose from try googling "css layout templates" or something like that.

They have: 26 posts

Joined: Nov 2008

IE6,IE7,Firefox that is the major problems with a designer when coding CSS. but if you could develop at least one successfully then you'll go ahead.

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

Beware using hacks in CSS - they may not work in future browser releases!

I have found most cross-browser issues are solvable by selecting the correct properties for position (relative, absolute etc) and display (block, inline)

If you must have browser specific styles (as is often necessary for IE6) it is best to include a separate stylesheet for future compatibility.

They have: 3 posts

Joined: Nov 2008

I'm having the same problem with ie 6 and 7. I'm not too familiar with css. How do I go about fixing the alignment in both?

Jason

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.