Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Separate stylesheet for Opera and Safari?
Old 12-18-2008, 12:52 AM Separate stylesheet for Opera and Safari?
Experienced Talker

Posts: 35
Name: Chris
Trades: 0
Hi.

I have been using <ifIE> tags to specify different stylesheets for IE.

Is there a similar way to use separate stylesheets for Opera and Safari?

<if Opera> & [if Safari] don't seem to work. The one method I have come across on the web uses php, but I'd like to do it with html if possible.

Chris
derjavina is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-18-2008, 01:56 AM Re: Separate stylesheet for Opera and Safari?
Experienced Talker

Posts: 46
Name: Daniel Cer
Trades: 0
I'm pretty sure conditional comments are IE only. But, this typically isn't too much of a problem since most other big browsers (FF, Opera, Safari) are relatively well behaved and standards compliant.

What is it that you don't like about the PHP approach? Also, what problem(s) are you experiencing that's requiring you to use a different style sheet for both Opera and Safari?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
danielcer is offline
Reply With Quote
View Public Profile
 
Old 12-18-2008, 02:28 AM Re: Separate stylesheet for Opera and Safari?
Experienced Talker

Posts: 35
Name: Chris
Trades: 0
www.haywire-media.com

The top graphic was suddenly showing up 1 pixel out in IE and FF (it was fine a couple of months ago!)

So I shifted a container div 1 px to compensate. Problem is Opera and Safari were okay and now they are out by 1 pixel.

As for php, I'd prefer a html workaround - it would be simpler if I don't have to view things over a server. Probably my code is not perfect, but I thought there might be an [ifIE] sort of thing for those other browsers so I could do a quick patch up job.
derjavina is offline
Reply With Quote
View Public Profile
 
Old 12-18-2008, 06:47 AM Re: Separate stylesheet for Opera and Safari?
Andy Pugh's Avatar
Extreme Talker

Posts: 203
Name: Andy
Location: N.Ireland
Trades: 0
The quickest workaround you could find would be to actually just fix the DIV, I don't have opera or safari so I can't recreate it myself, they generally work fine with anything that firefox is compatible with.. in my experience.

you would be better posting this in the CSS forum and asking for help in sorting out your positioning.
Thanks,
Andy
__________________

Please login or register to view this content. Registration is FREE
Andy Pugh is offline
Reply With Quote
View Public Profile
 
Old 12-18-2008, 10:21 AM Re: Separate stylesheet for Opera and Safari?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
First, use a better doctype than the sloppy HTML 4.01 transitional - at least go for HTML 4.01 STRICT.

Second, put the image dimensions on the images in your HTML, it's not a good practice to force the browser to calculate your image dimensions.

I would also recommend NOT using positioning that way. The position:relative for your overall container is ok, all the rest is just asking for headaches - and I don't see that you need it for that layout. Use the normal document flow, use margins, padding and floats to put things where you want them.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 12-18-2008, 10:39 AM Re: Separate stylesheet for Opera and Safari?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
You can target Safari (and Chrome) within a stylesheet like this:
Code:
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .special-styles {
         font-size: 20px;
    }
}
This used to work for Opera also, but it no longer does. There's no sign that any of the other browsers will start to support this type of selector in the future, though I can't think of any reason that you will ever actually need to use it.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Separate stylesheet for Opera and Safari?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42914 seconds with 12 queries