my web app runs properly but I haven't managed it to look like https://bookmarks-rails-2633.herokuapp.com/books.
The css seems to be there but not linked in to my app.
how can I achieve this?
Could you please post the code you have for
app/views/layouts/application.html.erb, then tell me what files show are in
here you go:
@zinyosrim Are you trying to include all of those CSS files, or are there a specific few CSS files among those you listed which you want to load?
One problem is that you can't have a space in a filename like you do with
merry weather.css, so try removing the space or replacing it with a dash (
-) or underscore (
_), and see if that helps
Well, The files were already there, I didn't add any css. I saw that relevant code is in bookmark.css but am wondering why it's not being taken into account
@zinyosrim Do you have a comment that looks like this in
/* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require_self *= require_tree . */
= require_self and
= require_tree . parts are the important parts there
@zinyosrim OK, that looks fine now. Could you post your
app/views/books/index.html.erb code now please?
Sorry this is taking so long
thanks for helping me
<% @books.each do |book| %>
<%= book.rank_this_week %>
<%= book.title %>
by <%= book.author %>
(<%= book.publisher %> )
<%= book.description %>
<%= link_to 'See all Editorial Reviews', book %>
<%= book.weeks_on_list %> weeks on list
<% end %>
@zinyosrim Can you try adding the
container class to the
<div> with the
book class? Like this:
<div class="container book"> <!-- ... --> </div>
looks much better now. I still have some styling issues but will do first the css course
thanks for your help and patience
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.