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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Posts
    108
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Changing the CSS value for P's mid Page

    Hey Guys,

    I've recently replaced another devloper on a project and have found it was really put together poorly. However I have to get the updates done and don't have the time to go through and fix the entire site.

    Right now my issue has to do with the fact that the old developer built the site with <p> having a margin of 0... everywhere... then built every piece of the site using p instead of ul or span. (For example the vertical navigation on the left is all <p>Item</p><br /><p>Item</p><br />) Ugh!

    Now they want me to use an RSS to post a daily devotional. No problem... at least until the css for p makes all the content bleed together with no spacing between paragraphs. If I declare p at the top of the page the rest of the page gets thrown off.

    Is there a way to change <p>'s margin value for just the section of the page that the RSS feed sits on? I'd just add a style to it but (obviously) the <p>'s get generated as part of the feed.

    Thanks in advance for any help.
    Last edited by CSSQuest; 05-13-2009 at 05:33 PM.

  • #2
    Regular Coder
    Join Date
    Jan 2009
    Posts
    316
    Thanks
    7
    Thanked 92 Times in 91 Posts
    Put the RSS feed into a separate div and apply the padding to the <p> tags within that div.

    eg.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    #rss_feed p {
    	padding:3px;
    }
    </style>
    </head>
    <body>
    <div id="rss_feed">
      <p>Content</p>
      <p>More Content</p>
    </div>
    </body>
    </html>

  • Users who have thanked Fisher for this post:

    CSSQuest (05-13-2009)

  • #3
    Regular Coder
    Join Date
    Mar 2009
    Posts
    108
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Great idea! I should have thought of that >.<

    Thanks for the help, it worked perfectly.


  •  

    Posting Permissions

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