Forum: Ruby on Rails RoR with CSS on Firefox?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bill W. (Guest)
on 2006-04-06 00:05
(Received via mailing list)
Does anybody have any experience getting CSS working with RoR on
Firefox?  I need help!!!

I'm trying to move to the <div> model from the <table> model so I can
use AJAX.  The move to <div>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 <div>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
Charlie B. (Guest)
on 2006-04-06 00:11
(Received via mailing list)
If some of your css is working then ror is working fine with your css.
Try checking out some of the many css forums.
Scott (Guest)
on 2006-04-06 00:58
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
Bill W. (Guest)
on 2006-04-06 03:57
(Received via mailing list)
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>
To: <removed_email_address@domain.invalid>
Sent: 2006-04-05 3:58 PM
Subject: [Rails] Re: RoR with CSS on Firefox?
Tom D. (Guest)
on 2006-04-06 04:39
(Received via mailing list)
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.  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> 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
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Tom D.

http://blog.atomgiant.com
http://gifthat.com
Bill W. (Guest)
on 2006-04-06 16:49
(Received via mailing list)
Hi Tom,

Tom D. wrote:
<snip>

> Also, for some CSS inspiration check out
> the CSS Zen Garden at 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/complexspira... 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
Alan F. (Guest)
on 2006-04-06 16:58
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/

Alan
Bill W. (Guest)
on 2006-04-06 18:25
(Received via mailing list)
Hi Alan,

Alan F. wrote:
<snip>
> 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/

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

Best regards,
Bill
Alain R. (Guest)
on 2006-04-06 20:45
(Received via mailing list)
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
This topic is locked and can not be replied to.