Seperate Stylesheets for IE6 and Mozilla/Firefox

Hi All,

I have decided to load 2 seperate stylesheets for Internet Explorer and
Firefox. As you know, the code in RadiantCS by default looks nice and
tight
using Firefox but in IE, is more open. Under old HTML sites, it was easy
to
add a Javascript in the section to load as required however with
Radiant, that is not so simple.

What is the best solution for this? Locate the specific .rhtml files for
the
site and edit each to include a Javascript/stylesheet modification or
make
an entry in each page through Radiant, to load a seperate stylesheet?

Cheers, Ben.

B.D.Minton
Technical Manager
Four Walls and A Roof
South Brisbane QLD AU
Email - [email protected]
Web - http://www.fourwallsandaroof.com.au
Sustainability: Education, Sales and Services

Ben,

Is the problem with the administration interface or with content on
your site (the public-facing site)? It’s hard to tell from your
description.

Sean

Hi Sean,

Good question: it is the public facing site.

btw there are some problems in admin javascripts:

  1. when you collapse a tree node it won’t expand again
  2. in IE pages under tree node are sorted in reverse order… don’t know
    why
    yet, maybe
    it’s some bug of reorder extension…

Ben,

I think that I understand your problem (I have a similar situation).
The solution depends on your exact needs:

If EVERY page needs this, then the magic that makes your styles work
goes in your main, site layout – right in the section as you
mentioned. Then, if every page uses this layout, every page gets your
magic.

If you only need this for a few select pages, then you either create a
custom layout for those pages and apply that layout to the needed pages
or, use a method similar to the one I mention in this post:
http://www.ruby-forum.com/topic/109023

As an aside, since I found that I needed a few extra css definitions
ONLY for IE 5 & 6, I used IE proprietary conditional statements (like:

)instead of javascript

browser detection.

I’m not a huge fan of IE conditionals normally, but because it was IE
only, this was a very clean way to accomplish my goals. Had I also
needed a stylesheet to handle Safari bugs (or Opera, etc), I’d have gone
the way of js. Just a suggestion.

-Chris

Hi Chris,

Thanks for the info, these IE/FF issues are site wide, so the
option
will be the go. Since you mentioned Safari and Opera, I should check the
site against them also.

Cheers, Ben.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs