Cross-browser compitabilty?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
diG1tY
Forum Newbie
Posts: 17
Joined: Sun Feb 01, 2009 2:50 pm

Cross-browser compitabilty?

Post by diG1tY »

My question this time isn't regarding PHP, but comes from HTML/CSS compatibility. I wrote a little page layout, just ordinary 3 column design with a few paragraphs and ordered lists. When I open it in Firefox it is rendered correctly, but when I open it in IE one of the lists or rendered below the position it is in FF. How do you go about hacking such problems? How do I write my code so that it is rendered the same way in all browsers? I read somewhere that you can load alternative styles for IE and other browsers, but I don't know how to go about this issue.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Cross-browser compitabilty?

Post by kaszu »

Problem is with this: http://ejohn.org/blog/sub-pixel-problems-in-css/
Solution (css for IE in same file):

Code: Select all

/* Normal browsers */
.column_1 { width: 25%; }
.column_2 { width: 50%; }
.column_3 {width: 25%; }
 
/* IE6 */
* html .last_column { width: 24.9%; }
 
/* IE7 */
*:first-child+html .last_column { width: 24.9%; }
To use separate files for IE see: http://www.quirksmode.org/css/condcom.html
Post Reply