FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Cross-browser style problem!

 


mynameis
http://cssmith.co.uk/news.php - My site (i designed it in firefox so in FF its how I designed it but in IE7 the menus stray off to the right) I use the webite CMS software e107 and therefore used css to style the layout.

I have seen on othersites that there are multiple stylesheets fixing problems in certain browsers such as a IE only sheet that fixes problems in the layout in Internet Explorer.

I have no Idea of how to do this.. please help
DoctorBeaver
The problem is that different browsers interpret the standards in different ways. There are many articles on the internet about it. Here's 1 such...

http://www-128.ibm.com/developerworks/web/library/wa-ie2mozgd/

The 1 problem that I find most galling is that of border, margin & padding. Some browsers include these in the size of the div, others add them on the outside (not strictly true, but close enough).

I use php to include different stylesheets for different browsers. I have all the common elements in the main css file & then call the browser-dependent file thus...

Code:
if (strstr($_SERVER['HTTP_USER_AGENT'], 'Opera')){
   echo '<link rel="stylesheet" type="text/css" media="screen" href="default/styles/opera.css" /></br>';


All I have in the browser-dependent files are those elements that have to be coded differently due to differences in standards between the browsers.

It doesn't take that long to do & in the long run it saves a lot of hassle.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.