Styling text

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

05-Jan-12 14:53
Good day there, all the best for 2012.

http://shinymanstudio.co.za/projects/COT/ on this project I am having a problem trying to style text.

In the main text content block the text is styled fine, however duplicating this for the other text boxes is problematic.

placing this;



<div id="sidebar">
<div class="sidebar-news"><p>testing</p></div>




p {
font-family: 'Lucida Grande', Helvetica, Arial, san-serif;
font-size: 15px;
color: #000;
padding: 5px 20px;
}


Breaks the layout, I tried putting in a selector for sidebar but this also seems to be incorrect.

Surely "p" should be global and should not break the layout when placing a "p" in the other text boxes.

If anyone could give me some insight into the problem it would be greatly appreciated.

-Thank-you
06-Jan-12 12:58
Think I solved the problem, but I know there will be problems with IE, will find a solution for that.
11-Jan-12 17:10
@TruthConquers: Happy 2012 to you

I didn't totally understand your original question, but if it's working now then great!

Selector specificity can be a tricky thing sometimes. This article might help:

http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated