[thelist] Issue with formatting paragraph

raskenbo raskenbo at gmail.com
Wed Mar 9 14:30:03 CST 2005


On Wed, 9 Mar 2005 14:21:25 -0500, Jim Mortland
<JMortland at psychologicalscience.org> wrote:
> I'm working on updating my company's web site to a table-less layout.
> One problem I have run into occurs on this page:
> http://www.psychologicalscience.org/beta/apssc/.  In the 2nd paragraph
> under Hotel Match-Up Program, I have this code:
> 
> <p class="small">The deadline for this program is March 31,
> 2005......</p>
> 
> The CSS I have to format the small class is:
> 
> .small, .summary {font-size: 95%;}
> 
> The whole stylesheet can be found at:
> http://www.psychologicalscience.org/beta/includes/layout.css
> 
> When I display the page, the text is not in the smaller size.  (It
> should be the same size as the text directly above it.)
> 
> I've validated the CSS and HTML to see if there were any errors that
> would affect the display, but none were found.  Does anybody have an
> idea as to what is causing this?
> 
> Thanks in advance,
> Jim Mortland

The following is the culprit:

#content p, #content li {
	font-size: .9em;
}

My guess is that the ID is taking precedence over class. Therefore
applying the "small" class to a paragraph within div#content has no
effect.

The following should work (specificity):

 #content p.small, .summary {font-size: 75%;}
 
Ken Chase
Freelance Web Design
http://www.kenchase.com


More information about the thelist mailing list