CSS specificity problem
-
Hi,
I wrote this code on my home page and I’m trying to set a CSS property on only the homepagediv class for ul and li items.
<div class="homepagediv"> <div class="panel-grid-cell" id="sitelatestposts"> <h1 class="blogtitle">News</h1> <div class="sitelatestpostsimg"> <ul> <li><a href="<?php the_permalink() ?>"><?php the_post_thumbnail(array( 220,130 )); ?></a> </li> </ul> </div> </div> <div class="panel-grid-cell" id="siteinfos"> <h1>Contact</h1> <p>Phone 992-552-6233</p> <div class="testingdiv"> <ul> <li><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></li> <li><p>Sed quis bibendum leo, quis dictum sapien.</p></li> </ul> </div> </div> </div>
The problem is that at the start of my CSS I have:
ul { padding: 0 0 0 40px; }
When I try things like:
.homepagediv li{ padding: 0; }
the li padding is still at 40px instead of 0 for this div.
Any ideas?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘CSS specificity problem’ is closed to new replies.