+ Reply to Thread
Results 1 to 2 of 2

Thread: error in css

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    34

    error in css

    Hello,

    I am trying to override this css from another file :
    Code:
    .products li {
      float: left;
      margin: 0 10px 20px 0;
      padding: 0;
      position: relative;
      width: 150px;
    }
    I am working with this HTML code :
    Code:
    <div id="main">
    
    <section id="primary"><div id="content" role="main"><div id="breadcrumb"><a class="home" href="http://www.bolistylus.com">Home</a>  &rsaquo; <a href="http://www.bolistylus.com/shop/">Shop</a></div>
                <h1 class="page-title">All Products</h1>
    
    <ul class="products">   
         <li class="product first">
            <a href="http://www.bolistylus.com/shop/boli-2/">
    
                <img width="150" height="150" src="http://www.bolistylus.com/wp-content/uploads/pinkproduct-150x150.png" class="attachment-shop_small wp-post-image" alt="pinkproduct" title="pinkproduct" />
    
                <strong>Boli Pink</strong>
    
                <span class="price">$24.00</span>
            </a>
    
            <a href="/shop/?add-to-cart=38&_n=188fa640fb" class="button">Add to cart</a>
        </li>   <li class="product ">
        </li></ul><div class="clear"></div> 
    
    </div></section>
    
        </div>

  2. #2
    Code:
    .products li has a specificity of (0, 0, 1, 1)
    a minimal higher specificity can be created with

    Code:
    ul.products li which has a specificity of (0, 0, 1, 2)

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts