Chrome / Safari Specific Stylesheet CSS Hack and Classes
Last Updated on Friday, 20 August 2010 03:46
Written by Erock
Tuesday, 10 August 2010 04:46
Written by Erock
Tuesday, 10 August 2010 04:46
So, I was working with the login-with-ajax wordpress plugin, When I noticed that it displays differently in chrome. I was blown away that firefox and internet explorer would both show the appropriate css styling and that chrome should some entirely different placing of the div via css.
So what I needed was a way to have two different style classes for each browser set..
So I did some research and found that we can use the webkit difference of chrome and safari to firefox and IE. So, if you want a chrome/safari specific css style override just frame it in the below code, and drop it in below the old line# in your stylesheet.
{code type=css}
#div1 {old rules for:IE,Firefox;}
@media screen and (-webkit-min-device-pixel-ratio:0) {
#div1 {new rules for:Chrome,Safari;}
}
{/code}
#div1 {old rules for:IE,Firefox;}
@media screen and (-webkit-min-device-pixel-ratio:0) {
#div1 {new rules for:Chrome,Safari;}
}
{/code}
Tags: ashland, chrome, css, css override, firefox, hack, hawaii, ie, kauai, oregon, safari, specific stylesheet, webdesign, webhosting, webkit
This entry was posted on Tuesday, August 10th, 2010 at 4:46 pm and is filed under Web Design Tips, Wordpress Tips.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
2 Comments
Leave a Reply
Categories
Archives
- Pro -Sites Shortcodes, Functions, And Level Checks
- Automatic WP Photo Gallery From Facebook Page Photos!
- Analytics 360 For Editors
- Add nofollow rel tags to image widget
- Image Widget Alignment Fix
- Add GD Star Rating next to Post Title
- Change The Buddypress Admin Bar Logo And Link In WP3 & BP 1.2+!
- New Dashboard Lockdown & WordPress To Buddypress Profile Page Plugin!
- Hide The WordPress Dashboard and wp-admin COMPLETELY!
- Blogs & Members Directory, Strange Nav Spacing FIX
Tags
art wear
ashland
ashland oregon
buddypress
chrome
clear dashboard
code
dashboard widgets
download
drop down menu
hawaii
iframe
image widget
kauai
kauai hawaii
kauai web
limit login attempts
multi-site
new blog defaults
oregon
paintball
plugin commander
plugin management
plugin management update
remove dashboard widgets
remove recent drafts
remove right now
safari
search engine optimization
shortcode
southern Oregon
web design
web development
web hosting
webkit
wordpress
wordpress mu
wordpress security
wp3
wp3 compatible
wpms
wpmu
wpmu2.9
wpmu compatible
wpmu security
















































Thanks so much for this! I was looking around for a while to find a solution. You rock.
Its very useful for me…It saves my time