• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: To Target Specific Browsers:
PostPosted: Sun Jan 11, 2009 6:28 am 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12640
Location: Arizona
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
}
}

_________________
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Last edited by Dr.CSS on Sat Dec 24, 2011 3:51 am, edited 4 times in total.
New calls...


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: To Target Specific Browsers:
PostPosted: Sun Feb 15, 2009 3:52 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jul 24, 2008 3:31 am
Posts: 139
Thanks for this.

_________________
CMSMS Made


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: To Target Specific Browsers:
PostPosted: Thu Mar 05, 2009 2:00 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Mar 04, 2008 10:37 am
Posts: 300
Location: The Netherlands
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..)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: To Target Specific Browsers:
PostPosted: Sat Dec 12, 2009 8:36 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Sat Mar 24, 2007 8:28 am
Posts: 422
Location: Long Beach, CA
antosha wrote:
If I understand correctly, the tags in the template won't work?



They will work, you just have to wrap them in the smarty {literal}{/literal} tags for example:

Code:
{literal}
<!--[if IE 6]>
  <p>Your browser sucks</p>
<![endif]>
{/literal}

_________________
Twitter: @cmsms_es


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: To Target Specific Browsers:
PostPosted: Fri Mar 05, 2010 5:10 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Jan 02, 2008 11:39 pm
Posts: 2102
Location: Lewiston-Idaho
Just figured I throw this here.. a handy tool I use alot for this.. browsertools Cheers -Jeremy


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: To Target Specific Browsers:
PostPosted: Thu Oct 14, 2010 1:19 pm 
Offline
New Member
New Member

Joined: Sun Apr 26, 2009 8:01 am
Posts: 6
There's also a way with javascript:
http://rafael.adm.br/css_browser_selector/

Very handy script, can target browsers and their different versions.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: To Target Specific Browsers:
PostPosted: Sun Oct 07, 2012 1:42 pm 
Offline
Forum Members
Forum Members

Joined: Mon Dec 05, 2011 4:40 pm
Posts: 67
Location: Voorburg, Nederland
Or use browser detection
for example viewtopic.php?f=4&t=63334


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting