SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Odd thing happening

    Hi Guys

    Not sure what's happening here, but does anyone know why I can't seem to style the product h1 or P tags?

    http://www.memorabiliadirect.co.uk/m...lia&category=1

  2. #2
    SitePoint Guru themightystephen's Avatar
    Join Date
    Mar 2005
    Location
    England
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You haven't got a class anywhere called "product" as far as I can see.

    Try something like this:

    Code:
    .product h1 {
    my heading 1 styles
    }
    
    .product p {
    my paragraph styles
    }
    btw next time could you provide the code so that we don't have look for the stylesheet(s) ourselves.
    Get your heelys now at flywalk.co.uk - But what are heelys?
    Heelys are simply shoes with wheels in the heels!

    Flywalk.co.uk - The UK Heelys Retailer

  3. #3
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there

    thanks for your reply

    I have this in my memorabilia style sheet

    PHP Code:
    /*******************************************
    * Memorabilia
    /******************************************/
    .catelogue {
        
    float:left;
        
    width:100%;
        
    margin:2em 0 2em 0;
    }
    .
    catelogue div.product {
        
    float:left;
        
    height:15em;
        
    width:30%;
        
    margin:1%;
        
    border:1px dotted #CCCCCC;
    }
    .
    catelogue div.product h1 {
        
    font-size:0.8em;
        
    color:#FF0000;
    }
    .
    catelogue div.product p {
        
    font-size:0.7em;
        
    color:#666666;

    But it doesn't seem to be working??

  4. #4
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    changed it to .products h1 and it's still not working this is very strange

  5. #5
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I changed the holder to an id instead of a class and it seems to work...strange, can nested class references get lost somehow?

  6. #6
    SitePoint Guru themightystephen's Avatar
    Join Date
    Mar 2005
    Location
    England
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well looking at your html code (I know its dynamic but the CSS is only applied after the PHP has been processed into normal HTML code) I couldn't see any id of catelogue; the only id I found similar to this was catelogue_holder. catelogue_holder seems to be the one that you used...

    i.e. does your code look like this now?
    Code:
    /*******************************************
    * Memorabilia
    /******************************************/
    
    #catelogue_holder {
        float:left;
        width:100%;
        margin:2em 0 2em 0;
    }
    
    #catelogue_holder div.product {
        float:left;
        height:15em;
        width:30%;
        margin:1%;
        border:1px dotted #CCCCCC;
    }
    
    #catelogue_holder div.product h1 {
        font-size:0.8em;
        color:#FF0000;
    }
    
    #catelogue_holder div.product p {
        font-size:0.7em;
        color:#666666;
    }
    Get your heelys now at flywalk.co.uk - But what are heelys?
    Heelys are simply shoes with wheels in the heels!

    Flywalk.co.uk - The UK Heelys Retailer

  7. #7
    SitePoint Wizard wonshikee's Avatar
    Join Date
    Jan 2007
    Posts
    1,223
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    It might be the way you're selecting it.

    ie
    <style>
    #wrapper div { height: 100px; background: red; }
    .short { height: 50px; background: green; }
    </style>

    <div id='wrapper'>
    <div class='short'></div>
    </div>

    You'll find short is not working.


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
  •