DotDragnet
May 24, 2012, 11:09:08 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Mobile users - Our forum is Tapatalk enabled. http://www.tapatalk.com/
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Different styles for browsers in style sheet  (Read 1093 times)
charlie
Hero Member
*****
Posts: 837



View Profile WWW Awards
« on: September 03, 2007, 05:01:48 PM »

Got a bit of a width problem in ie6 but only in teh Chinese UTF-8 version for some reasons. Is it possible to change an attribute of a style to apply to the correct browser.

for eg

#quote {width:261px;
height:270px;
padding-left:16px;
background-color:#ffffff;
float:left;}

for example works fine in ie7 and Moz  but lets say it's too wide in ie6 so I want it to be


#quote {width:250px;
height:270px;
padding-left:16px;
background-color:#ffffff;
float:left;}

is there a way to change it or is it better to simply change the Div name ?

this is why:

same codes but UK version http://home2.btconnect.com/mission-links/testsite/index.php

and Chinese version > http://home2.btconnect.com/mission-links/testsite/china_index.php
« Last Edit: September 03, 2007, 05:08:24 PM by charlie » Logged

Mr Anderson
DDN Contribs
Hero Member
*****
Posts: 2267



ap4a.uk ap4a
View Profile WWW Awards
« Reply #1 on: September 03, 2007, 05:33:19 PM »

Use conditional comments to link to a separate IE 6 stylesheet which will just contain override rules.

Code:
<!--[if IE 6]>
<link href="ie6.css" rel="stylesheet" media="screen" />
<![endif]-->

Edit: that would go after the link to your main stylesheet(s).
Logged

charlie
Hero Member
*****
Posts: 837



View Profile WWW Awards
« Reply #2 on: September 03, 2007, 06:21:55 PM »

cheers  .. just discovered he now wants a Hong Kong AND Chinese version ... one complicated and teh other simplified apparently .. watch this space  Sad


And sorted .. but how weird .. I;ve left the odd bg colours for now so u can see at

http://home2.btconnect.com/mission-links/testsite/hongkong_index.php

To get the left col narrow enough I had to use the css

#leftcol {width:21px;
margin-left:8px;
margin-top:10px;
float:left;
background-color: #de1818;
}

that's 21px .. which it obviously isn't

yet for the regular css it's 211px wide ... very odd .. the only difference really was saving as UTF-8

suspect more fun and games ahead !!
« Last Edit: September 03, 2007, 06:34:43 PM by charlie » Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!