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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060405/ecdc0de8/attachment.html
If some of your css is working then ror is working fine with your css. Try checking out some of the many css forums. On Wed, 2006-04-05 at 13:56 -0500, Bill Walton wrote:> 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 > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060405/17cc4817/attachment.html
> I know that it''s finding / using the stylesheet though, because I haveanother entry in there that _does_ get used. If it''s purely a CSS-issue, there are two tried-and-true things to check for first: 1) What doctype are you specifying in your HTML document? To trouble-shoot display issues with CSS, it''s *really* helpful to make sure you''re triggering "Standards" mode in both MSIE, Gecko-, and kHTML/Webkit-based browsers (as opposed to Quirks mode). 2) Assuming you are using a valid doctype and it''s triggering Standards-mode, does your CSS code validate? And while you''re at it, it''s good idea to check and validate your markup, too. About half the time, fixing either of these two issues fixes the display issue. If that doesn''t fix the issue, you might want to either post your CSS code here or on the CSS-List.
If you don''t know a lot of CSS, trust me there is a lot to learn - and that''s not mentioning how it will render differently from IE to FF and Mac to PC. If you have an online sample I''d be happy to look at it and help you out. Jason
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 -- Posted via http://www.ruby-forum.com/.
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" <scottcarlhughes@gmail.com> To: <rails@lists.rubyonrails.org> Sent: 2006-04-05 3:58 PM Subject: [Rails] Re: RoR with CSS on Firefox?> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
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 Walton <bill.walton@charter.net> 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 > > 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" <scottcarlhughes@gmail.com> > To: <rails@lists.rubyonrails.org> > Sent: 2006-04-05 3:58 PM > Subject: [Rails] Re: RoR with CSS on Firefox? > > > > 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 > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tom Davies http://blog.atomgiant.com http://gifthat.com
Hi Tom, Tom Davies 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/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
Bill Walton 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 :" ;-pHil 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 -- Posted via http://www.ruby-forum.com/.
Hi Alan, Alan Francis 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
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