SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict martinfamily2005's Avatar
    Join Date
    Jul 2010
    Posts
    235
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can;t get text to move with css

    On this page: www.billboardfamily.com at the bottom, there is a box for Non-Profits. There is an image, and text. I want to give the text some padding on top to move it down, but NOT THE IMAGE. I can not do it, for some crazy reason. Can someone help me out, please?

  2. #2
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by martinfamily2005 View Post
    On this page: www.billboardfamily.com at the bottom, there is a box for Non-Profits. There is an image, and text. I want to give the text some padding on top to move it down, but NOT THE IMAGE. I can not do it, for some crazy reason. Can someone help me out, please?
    Erm, take the image out from between the <p> tags so it doesn't inherit the text styles?

  3. #3
    SitePoint Addict martinfamily2005's Avatar
    Join Date
    Jul 2010
    Posts
    235
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is done automatically by Wordpress, there is no way, to my knowledge, to separate it out. the image and text (the entire post) are pulled with <?php? the_excerpt() ?> and wordpress does the rest.

  4. #4
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by martinfamily2005 View Post
    That is done automatically by Wordpress, there is no way, to my knowledge, to separate it out. the image and text (the entire post) are pulled with <?php? the_excerpt() ?> and wordpress does the rest.
    On the text, can you put a <span> on there and style the span with the padding required? I have nowhere to test this right now, but it's something I'd try.

    HTML Code:
    <span style='padding-top:10px;'>Text Here</span>
    Can try margin if padding doesn't work....

  5. #5
    SitePoint Addict martinfamily2005's Avatar
    Join Date
    Jul 2010
    Posts
    235
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is not possible...That is all generated by Wordpress....I did not manually create that text. It is created within wordpress, by wordpress. I have no control over its markup at all.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    If all you have to work with is the p element then apply the margin to the p element but then drag the image back upwards.
    e.g.

    Code:
    #mainblog .non-profit-bottom img{margin-top:-15px}
    #mainblog .non-profit-bottom p{margin:20px 0 -10px}


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
  •