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.

CSS Forum


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



Reply
Styling for Different Browsers
Old 05-10-2006, 11:36 AM Styling for Different Browsers
Super Talker

Posts: 116
Trades: 0
Hi All...

Usually I'm in the PHP forum but I have a question here. This might be a really simple & dumb question, but I can't see to find a solution.

I'm re-designing the corporate newsletter from tables (ughhh!!!!) into XHTML & CSS.

I'm testing my design across browsers and noticed that on the horizonal menus, Mozilla/Firefox & IE6 (major Ugh!!!!) really need to have the style slightly different.

I was going to create a single global sheet and then the discrepancies for the horizontal menu into two different stylesheets that I would load with JavaScript.

Yet, I'm trying to avoid JavaScript if I could on these pages. Is there a way to place into a style sheet how to have the style react to different browsers?

Thanks
Donna Z.
DonnaZ is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-10-2006, 11:59 AM Re: Styling for Different Browsers
Super Talker

Posts: 102
Trades: 0
You could make a seperate stylesheet with IE hacks/workaround only, and name it iestyles.css

If you import it like this, only IE will see it, the other browser will ignore the stylesheet all together ...

Code:
<head>
<!--[if IE]>
  <style type="text/css">
    @import url(ie-styles.css);
  </style>
<![endif]-->
</head>

Last edited by ghettobert; 05-10-2006 at 12:01 PM..
ghettobert is offline
Reply With Quote
View Public Profile
 
Old 05-10-2006, 12:58 PM Re: Styling for Different Browsers
Super Talker

Posts: 116
Trades: 0
Thank you so much!!!!
DonnaZ is offline
Reply With Quote
View Public Profile
 
Old 05-10-2006, 07:20 PM Re: Styling for Different Browsers
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Hacks are never a good idea for a few reasons...
If you've got PHP knowledge, can't you use server side browser sniffing to dish out the correct stylesheet? I do this tequnique but in ASP.NET.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-10-2006, 07:25 PM Re: Styling for Different Browsers
RNPoo7's Avatar
Extreme Talker

Posts: 238
Trades: 0
The difference between IE and firefox are really starting to annoy me very much.

Everytime I do something, it ends up a problem in the other browser
RNPoo7 is offline
Reply With Quote
View Public Profile
 
Old 05-10-2006, 07:38 PM Re: Styling for Different Browsers
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
As you learn, it gets easier to spot the differences and know what works and what doesn't. Usually it's just a case of an extra bit of padding that can be taken off without affecting the other browser(s). For the more complicated issues (For example I had to dish out invalid HTML to so-called 'standards compliant' Firefox in order to get it to display a nested list proplerly) then you can use seperate stylesheets.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-10-2006, 11:55 PM Re: Styling for Different Browsers
blue-dreamer's Avatar
King Spam Talker

Posts: 1,222
Location: Middle England
Trades: 0
Quote:
Originally Posted by RNPoo7
The difference between IE and firefox are really starting to annoy me very much.

Everytime I do something, it ends up a problem in the other browser
It's a bummer. I try to check in IE, FF and Opera as I'm actually building the site and tweak as I go along.
blue-dreamer is offline
Reply With Quote
View Public Profile
 
Old 05-17-2006, 03:57 PM Re: Styling for Different Browsers
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
As someone pointed out, DonnaZ, be very careful with hacks and try not to use them when you can. Many of those hacks are specifically for IE, and with the release of 7 at some point in the not-too-distant future, those hacks could pose other problems down the road.

IE and Firefox usually aren't that different. Yeah, there are things that IE does that Firefox doesn't, and vice versa, but quite often it's just a matter of selecting an alternate property or adjusting another one to match both browsers.

Hack minimally, and only when absolutely necessary.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Styling for Different Browsers
 

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 1.27705 seconds with 12 queries