# RoR with CSS on Firefox?

**URL:** <https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926>\
**Category:** Rails\
**Created:** [April 5, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926 "2006-04-05T22:05:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 5, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/1 "2006-04-05T22:05:24Z")

</div>

Does anybody have any experience getting CSS working with RoR on  
Firefox? I need help!!!

I’m trying to move to the

 model from the model so I can  
use AJAX. The move to 
s requires I also start using CSS for  
layout, etc.

So here’s the problem I’m having.

Firefox will not use the styles I’ve defined for the

s. They never  
change color as expected (that’s all the styles define) though they do  
in IE. I’m using Firebug with Firefox and, in addition to not  
displaying as expected, I get an error everytime I try to access the  
Style tab. I know that it’s finding / using the stylesheet though,  
because I have another entry in there that _does_ get used.

Also, I have an image in the banner that’s not displaying either. Yet  
if I right click on the place holder and select “View Image” it pulls it  
up just fine.

I’m going crazy here!!! Can someone please help?!?!?

Thanks in advance,  
Bill

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 5, 2006, 10:11pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/2 "2006-04-05T22:11:31Z")

</div>

If some of your css is working then ror is working fine with your css.  
Try checking out some of the many css forums.

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 5, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/3 "2006-04-05T22:58:31Z")

</div>

Bill,  
It sounds as if your developing in IE. Don’t develop using IE. It’s a  
hard habit to break but once you do your life will become easier. Use  
FireFox then correct the CSS to accommodate IE flaws such as the Box  
Model Hack etc. Believe me it’s much easier this way.

I’m not sure but it sounds as if your developing RoR and your look and  
feel at the same time. If you are, try designing the page look in your  
favorite editor. Then move the CSS to RoR and carve up the elements of  
the page and stick them in the view/s helper/s etc…

Hope this helps.  
Scott

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 6, 2006, 1:57am UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/4 "2006-04-06T01:57:18Z")

</div>

Hi Scott (and Jason and Dean),

Good advice from all. Turns out the problem was that IE could work with  
‘background: fcc’ but Firefox needed ‘background-color: #fcc’. I  
didn’t  
know about the online validation tools and did join / contact the  
css-discuss list. They showed me how to fix the initial problem and  
pointed  
me to the validation tools. What I’ve got works now but I’m getting  
warnings in the validation tools: “You have no color with your  
background-color :” ;-p

There really is a lot to learn to move from tables to CSS. I’m trying  
to  
see it as an ‘opportunity’ 😉

Thanks for your help!

Best regards,  
Bill  
----- Original Message -----  
From: “Scott” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: 2006-04-05 3:58 PM  
Subject: [Rails] Re: RoR with CSS on Firefox?

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 6, 2006, 2:49pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/5 "2006-04-06T14:49:53Z")

</div>

Hi Tom,

Tom D. wrote:

> Also, for some CSS inspiration check out  
> the CSS Zen Garden at [http://csszengarden.com](http://csszengarden.com).  
> It is a great way to learn how to do CSS by  
> example.

I saw Zen Garden and thought something like “That’s cool. I can see  
where  
that could be a real timesaver WRT responding to customer change  
requests  
and such. But if I wasn’t too pressed for time, I could probably do any  
one  
of those with tables.”

Then I found Eric Meyer’s site. Use Firefox to checkout  
[http://www.meyerweb.com/eric/css/edge/complexspiral/glassy.html](http://www.meyerweb.com/eric/css/edge/complexspiral/glassy.html) and the  
links off it.  
They got me to “Damnit man!!! Screw tables. I gotta learn this.” I  
can  
tell it’s going to be a steep climb. But now I’m convinced.

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 6, 2006, 2:39am UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/6 "2006-04-06T02:39:33Z")

</div>

Hi Bill,

background works fine with Firefox. The missing ingredient was the #  
sign. Firefox needs it unless you are specifying the named colors  
such as background:blue;

So, this should work as well:

background: #fcc;

Also, for some CSS inspiration check out the CSS Zen Garden at  
[http://csszengarden.com](http://csszengarden.com). It is a great way to learn how to do CSS by  
example.

Good luck to you. CSS can be painful to learn, but once you get the  
hang of it you will never go back.

Tom

On 4/5/06, Bill W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> There really is a lot to learn to move from tables to CSS. I’m trying to  
> Subject: [Rails] Re: RoR with CSS on Firefox?
> 
> > favorite editor. Then move the CSS to RoR and carve up the elements of  
> > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Tom D.

[http://blog.atomgiant.com](http://blog.atomgiant.com)  
[http://gifthat.com](http://gifthat.com)

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 6, 2006, 4:25pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/7 "2006-04-06T16:25:47Z")

</div>

Hi Alan,

Alan F. wrote:

> I can _strongly_ recommend  
> “Headfirst XHTML + CSS”. Early material is  
> quite basic, but still worth consuming. The  
> later material is where it gets interesting, but  
> they (and I) stress it’s worth working your way  
> through carefully.
> 
> [http://www.amazon.com/gp/product/059610197X/](http://www.amazon.com/gp/product/059610197X/)

Thanks very much for the pointer. I’ll definitely pick it up.

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 6, 2006, 2:58pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/8 "2006-04-06T14:58:12Z")

</div>

Bill W. wrote:

> Hi Scott (and Jason and Dean),
> 
> Good advice from all. Turns out the problem was that IE could work with  
> ‘background: fcc’ but Firefox needed ‘background-color: #fcc’. I  
> didn’t  
> know about the online validation tools and did join / contact the  
> css-discuss list. They showed me how to fix the initial problem and  
> pointed  
> me to the validation tools. What I’ve got works now but I’m getting  
> warnings in the validation tools: “You have no color with your  
> background-color :” ;-p

Hil Bill,

The warning is hjust a warning, like defining equals and hashcode  
together in Java, it’s a good idea to define color and background-color  
together (so you don’t end up with black on black 🙂

I can _strongly_ recommend “Headfirst XHTML + CSS”. Early material is  
quite basic, but still worth consuming. The later material is where it  
gets interesting, but they (and I) stress it’s worth working your way  
through carefully.

[http://www.amazon.com/gp/product/059610197X/](http://www.amazon.com/gp/product/059610197X/)

Alan

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [April 6, 2006, 6:45pm UTC](https://www.ruby-forum.com/t/ror-with-css-on-firefox/56926/9 "2006-04-06T18:45:03Z")

</div>

Scott wrote:  
\> Use FireFox then correct the CSS to accommodate IE flaws such as  
the Box  
\> Model Hack etc. Believe me it’s much easier this way.

It’s not that simple/black and white: for a new project, I’ve been  
developing on Mac + Firefox for a month and we’ve just started testint  
on IE! result : Kaboum.

- Autocompletion doesn’t work
- Ajax is dog slow (5-10x slower) on IE
- loads of tiny css problems.

If your app needs to support IE, check regularly that no big problem has  
sneaked into your code.

Alain
