To Target Specific Browsers:
#ID or .class is like div#main or div.main
 * html #ID or .class {
   ie6
}
NOTE: sometimes IE6 requires...
* html body #ID or .class {
   ie6
}
*:first-child+html #ID or .class {
   ie7
}
#ID or .class, x:-moz-any-link, x:default {
    FF3
}
body:nth-of-type( ) #ID or .class {
    OLDER versions of: chrome and safari
}
       OR
body:nth-of-type(1) #ID or .class {
   chrome and safari, this will just target the 1st one
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
 #ID or .class {
    new versions of chrome and safari
  }
}
First time ever I had to target Firefox only as all other browsers showed the same thing...
@-moz-document url-prefix() { 
#ID or .class {
	for latest firefox
}
}
			
			
													To Target Specific Browsers:
To Target Specific Browsers:
					Last edited by Dr.CSS on Sat Dec 24, 2011 3:51 am, edited 4 times in total.
					
Reason: New calls...
			
						
										
						Reason: New calls...
- 
				christiaans
- Power Poster 
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: To Target Specific Browsers:
Could come in handy, but the thing is that your css will not validate. 
Another option would be a simple javascript detection browser, and then passing on a class for that specific browser. (fairly easy to do, but only for specific elements and such..)
			
			
									
						
										
						Another option would be a simple javascript detection browser, and then passing on a class for that specific browser. (fairly easy to do, but only for specific elements and such..)
Re: To Target Specific Browsers:
They will work, you just have to wrap them in the smarty {literal}{/literal} tags for example:antosha wrote: If I understand correctly, the tags in the template won't work?
Code: Select all
{literal}
<!--[if IE 6]>
  <p>Your browser sucks</p>
<![endif]>
{/literal}
- 
				JeremyBASS
Re: To Target Specific Browsers:
Just figured I throw this here.. a handy tool I use alot for this.. browsertools Cheers -Jeremy
			
			
									
						
										
						Re: To Target Specific Browsers:
There's also a way with javascript:
http://rafael.adm.br/css_browser_selector/
Very handy script, can target browsers and their different versions.
			
			
									
						
										
						http://rafael.adm.br/css_browser_selector/
Very handy script, can target browsers and their different versions.
Re: To Target Specific Browsers:
Or use browser detection
for example http://forum.cmsmadesimple.org/viewtopi ... =4&t=63334
			
			
									
						
										
						for example http://forum.cmsmadesimple.org/viewtopi ... =4&t=63334



