My Book page wont change its design to the new one in chapter 3.

1 view
Skip to first unread message

dwaonsolo

unread,
May 5, 2009, 11:23:26 PM5/5/09
to Beginning Ruby on Rails E-Commerce
On my work, the style.css works on the rest of my pages fine except
for the books one. It just has a simple white background with the
links on them. This is how the style.css code:

body, p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}

pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}

a { color: #000; }
a:visited { color: #666; }
a:hover { color: #fff; background-color:#000; }

.fieldWithErrors {
padding: 2px;
background-color: blue;
display: table;
}

#errorExplanation {
width: 400px;
border: 2px solid blue;
padding: 7px;
padding-bottom: 12px;
margin-bottom: 20px;
background-color: #f0f0f0;
}

#errorExplanation h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
background-color: #c00;
color: #fff;
}

#errorExplanation p {
color: #333;
margin-bottom: 0;
padding: 5px;
}

#errorExplanation ul li {
font-size: 12px;
list-style: square;
}

#notice {
padding: 5px;
margin: 0px;
background-color: #FFCC80;
}

#tags_update {
font-size: 75%;
font-weight: normal;
margin: 0px;
padding: 0px;
border:1px solid black;
background-color: white;
}


#menu ul {
padding: 2px;
margin: 2px;
list-style: none;
border-top: 5px solid #B36B00;
border-bottom: 1px solid grey;
}

#menu ul li {
margin: 0px;
padding-left padding-right: 10px;
display: inline;
}

#menu a, #menu a:visited, #menu a:active {
font-weight: bold;
color: black;
font-size: 110%;
text-decoration:none;
}

#menu a:active {
background-color: grey;
}

#menu a:hover {
color: white;
}

#header{
}

#content {
padding-bottom: 15px;
border-bottom: 1px solid grey;
}

#logo {
font-size: 250%;
}


#footer {
width: 100%;
text-align: center;
}

#slogan {
position: relative;
font-size: 70%;
margin: 0px;
line-height: 0px;
top: -10px;
left: 80px;
}

dt {
font-weight: bold;
}

#shopping_cart {
border-left: 3px solid #666;
background: #aaa;
position: fixed;
bottom: 0;
right: 0;
width: 200px;
height: 100%;
padding: 5px 10px;
}

#shopping_cart ul,
#shopping_cart li {
list-style: none;
margin: 0;
padding: 0;
}

#shopping_cart h3 {
padding-top: 4em;
}

#cart_notice {
border: 2px solid #58A986;
background: #B2FFD3;
padding: 3px;
position: absolute;
top: 0;
left: 10px;
}

body {
background-color: #fff; color: #333;
margin-right: 230px;
}

#recommended {
border-left: 3px solid #666;
background-color: white;
position: fixed;
bottom: 0;
right: 0;
width: 200px;
height: 100%;
padding: 5px 10px;
}
#loginlogout {
background-color: #ccc;
padding: 8px;
width: 100px;
position: absolute;
top: 0px;
right: 10px;
}


This code doesn't look wrong to me because i copied it straight from
the sample code. What do you think is wrong?

Jarkko Laine

unread,
May 6, 2009, 1:39:06 AM5/6/09
to railsec...@googlegroups.com

I'm afraid it's impossible to tell from just reading CSS code. Install
Firebug and use its "inspect element" functionality to see which css
rules (don't) apply to your page elements.

//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://odesign.fi

Check out my latest book, Unobtrusive Prototype, fresh off the
Peepcode oven:
http://peepcode.com/products/unobtrusive-prototype-js

Reply all
Reply to author
Forward
0 new messages