Can someone help convert this to css?

Discussion in 'CSS' started by dinki, Aug 15, 2008.

  1. #1
    I'm a css newbie. I have a really basic question and wonder if you guys can help. Here's the code:
    
    <td  style='padding-left:10px; height:32px;' >Chicken Gumbo</td>
    
    Code (markup):
    I would like the text 'Chicken Gumbo' to have the attributes of 'padding-left:10px; height:32px;' when I wrap the text in an H1 tag. I only want this to happen on my 'details.php' page. I know that css can accomplish this, but I'm not sure how to go about setting it all up. I guess I somehow have to declare the page somewhere in the table (class?) and then have some kind of 'details.h1' definition? Any help is much appreciated. I've tried a few things and have failed miserably.
     
    dinki, Aug 15, 2008 IP
  2. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    .h1Details
    {
     padding:0px;
     margin:0px;
     padding-left:32px;
     height:32px;
    }
    
    Code (markup):
    Then your code on the details page would be...

    
    <h1 class="h1Details">Chicken Gumbo</h1>
    
    Code (markup):
    That should work. I didn't test it. Let me know if it worked.
     
    LeetPCUser, Aug 15, 2008 IP
  3. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Just tested it...it works.
     
    LeetPCUser, Aug 15, 2008 IP
  4. dinki

    dinki Well-Known Member

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #4
    Excellent! Much appreciated my friend!
     
    dinki, Aug 15, 2008 IP