Forum: Ruby on Rails Agile Web Development p.89

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.
Dd99f2e3ad1607011c17feea9737f397?d=identicon&s=25 Ben Brightwell (neogia)
on 2006-06-10 17:40
I've been following along just fine with the depot app, up until I make
the catalog, where, when the price is displayed with formatting, the
price shows up underneath the <div> bar for the next item in the
catalog.

If, in index.rhtml, I change the <span class="price"> to just <span>, or
equivalently, remove the entire <span...> tag, it works just fine, but
with no font/color modification. I can't quite figure out where the
problem lies, so any help would be appreciated.
Fd17e0a67191e9e72df285e1b8e4c2fb?d=identicon&s=25 Will Clark (Guest)
on 2006-06-10 18:01
(Received via mailing list)
If you post your css code & rhtml code it would help to see what the
problem may be.

thanks,
will clark    //    graphic design
www.willclarkdesigns.com/

will@willclarkdesigns.com
559 | 584 6785
559 | 380 2731 [ facsimile ]
620c12639078ea2dde8a3b50ccee4c05?d=identicon&s=25 Dark Ambient (Guest)
on 2006-06-10 18:53
(Received via mailing list)
Sorry, because I need to give you a quick answer here (no time to trace
back
my own work) but I had the same issue.  Strangely enough a few
iterations
forward seemed to automagically correct that issue.

Hope this helps and appologize for the  quick answer but it seemed like
some
formatting was added on in the iterations that corrected it.

Stuart
Dd99f2e3ad1607011c17feea9737f397?d=identicon&s=25 Ben Brightwell (neogia)
on 2006-06-11 05:04
Thanks for the help, @Dark Ambient: Glad to know I'm not the only one.
Here's my code if someone wants to take a look:

[index.rhtml]
<h1>Your Pragmatic Catalog</h1>

<% for product in @products -%>
    <div class="entry">
        <img src="<%= product.image_url %>"/>
        <h3><%= h(product.title) %></h3>
        <%= product.description %>
        <span class="price"><%= product.price %></span>
    </div>
<% end %>

[depot.css (truncated)]
#store  .entry {
  border-bottom: 1px dotted #77d;
}

#store  .title {
  font-size: 120%;
  font-family: sans-serif;
}

#store .entry img {
  width: 75px;
  float: left;
}


#store .entry h3 {
 margin-bottom: 2px;
 color: #227;
}

#store .entry p {
 margin-top: 0px;
 margin-bottom: 0.8em;
}

#store .entry .price-line {
}

#store .entry .add-to-cart {
  position: relative;
}

#store .entry  .price {
  color: #44a;
  font-weight: bold;
  margin-right: 2em;
  float: left;
}

Thanks in advance for any help.

Will Clark wrote:
> If you post your css code & rhtml code it would help to see what the
> problem may be.
>
> thanks,
> will clark    //    graphic design
> www.willclarkdesigns.com/
>
> will@willclarkdesigns.com
> 559 | 584 6785
> 559 | 380 2731 [ facsimile ]
This topic is locked and can not be replied to.