Background stripes not seen in my web application.

26 views
Skip to first unread message

Bruce Howard

unread,
Jul 24, 2015, 3:42:38 PM7/24/15
to rubyonra...@googlegroups.com
I am learning Ruby on Rails using the textbook called "Agile Web
Development with Rails (4th edition)". I am currently on Chapter 6. I
created the Depot application. Everything matches up with the author's
results except for the alternating purple stripes in the product
listings page. Instead, I end up with white background for all 3
listings. I followed all the author's instructions and rewrote all the
files as necessary.

I am wondering what needs to be changed so that the purple stripes will
be displayed in the browser.

Attachments:
http://www.ruby-forum.com/attachment/10926/textbook_results.jpg
http://www.ruby-forum.com/attachment/10927/my_results.jpg


--
Posted via http://www.ruby-forum.com/.

Frederick Cheung

unread,
Jul 24, 2015, 3:46:49 PM7/24/15
to Ruby on Rails: Talk, li...@ruby-forum.com, li...@ruby-forum.com
On Friday, July 24, 2015 at 8:42:38 PM UTC+1, Ruby-Forum.com User wrote:
> I am learning Ruby on Rails using the textbook called "Agile Web
> Development with Rails (4th edition)". I am currently on Chapter 6. I
> created the Depot application. Everything matches up with the author's
> results except for the alternating purple stripes in the product
> listings page. Instead, I end up with white background for all 3
> listings. I followed all the author's instructions and rewrote all the
> files as necessary.
>
> I am wondering what needs to be changed so that the purple stripes will
> be displayed in the browser.
>

It's hard to say just from the results. Most likely there is either a mistake in the CSS or the HTML has the wrong structure/class names.

Fred

Jesse Knutsen

unread,
Jul 24, 2015, 3:47:03 PM7/24/15
to rubyonra...@googlegroups.com
Are you cycling the class of the tr or div that you are using to house
the data?
Also did you remember to define the classes in your css?

Bruce Howard

unread,
Jul 25, 2015, 2:39:15 AM7/25/15
to rubyonra...@googlegroups.com
Jesse Knutsen wrote in post #1176873:
> Are you cycling the class of the tr or div that you are using to house
> the data?
> Also did you remember to define the classes in your css?

Alright, should I just show you what I have in my code files?

Colin Law

unread,
Jul 25, 2015, 3:24:58 AM7/25/15
to rubyonra...@googlegroups.com
On 25 July 2015 at 07:38, Bruce Howard <li...@ruby-forum.com> wrote:
> Jesse Knutsen wrote in post #1176873:
>> Are you cycling the class of the tr or div that you are using to house
>> the data?
>> Also did you remember to define the classes in your css?
>
> Alright, should I just show you what I have in my code files?

First try to work it out for yourself. Look at the html generated
(View Source or something similar in the browser) and make sure that
the correct html is there that should show the stripes. If that looks
correct then check your css files to make sure it looks right there.
If they both look right then show us a snippet of the html and the
relevant section of css. If the html does not look right and you
cannot see why then just post the relevant section of the view code
that generates it, along with the html it generates.

Colin
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages