Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: css padding

  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation css padding

    On this page http://74.52.63.159/~dbolton/Program.htm referencing the two paragraphs

    “During the first week of the Program we meet for several days (as needed) for process, policy and relationship development giving us a jump start developing and building your IP portfolio.”

    (This 2nd paragraph needs to have a padding of lets say 125px. And the top paragraph needs to stay put.)
    --and--
    “Invention Assignment
    Joint Venture and Strategic Alliance
    Asset Sale/Asset Transfer
    Licensing in and Licensing out Agreements
    Non-Disclosure, Non-Competition Agreements”

    My problem is that the paragraphs are all set under a <div class=”box4-content”>
    So when I change the spacing on one page the other spacing gets messed up. I was thinking that all I would have to do is copy
    .box4-content p, .box4-content td {
    color:#F7F7F7;
    font-family:Georgia,"Times New Roman",Times,serif;
    font-size:18px;
    line-height:1.1em;
    padding:5px 0 5px 70px;
    vertical-align:top;
    }

    And put a class on the paragraph that I wanted to indent (so it wouldn’t indent all other paragraphs on other pages)
    So in the html on that paragraph tag on the paragraph i wanted to indent set p class=IndentSDB and then copy and paste the same css with the added class so it is unique to that paragraph like so (this is not implemented in production only in testing)

    .box4-content p, .box4-content td, p.IndentSDB {
    color:#F7F7F7;
    font-family:Georgia,"Times New Roman",Times,serif;
    font-size:18px;
    line-height:1.1em;
    padding:5px 0 5px 125px !important;
    vertical-align:top;

    That did not work the padding was still being overridden – so I tried the !important on padding, but that over rode the top css style and all padding was 125px. I am really stumped here can someone shed some light on this problem that seems so simple.

    Thanks in advance
    Last edited by Sbolton; 10-22-2010 at 06:52 PM.

  • #2
    New to the CF scene
    Join Date
    Oct 2010
    Location
    NJ
    Posts
    6
    Thanks
    0
    Thanked 1 Time in 1 Post
    You don't need to copy everything for the new class - just what you're changing. The rest will be inherited. Just be specific and the rule should stick:

    Code:
    .box4-content p.IndentSDB {padding-left:125px}


  •  

    Posting Permissions

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