WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Backgorund Image for #content (4 posts)

  1. CollagenUK
    Member
    Posted 4 years ago #

    Hey,

    Apologies if this has already been covered - tried looking for a solution and found nothing.

    I currently have an XHTML theme that I am converting into a wordpress theme. I have managed to do it but I have a few problems with a background image on the post side of the site. Basically on my html theme I have three images that when joined create a rounded corner box. I have merged these together to create one image and used this one image as the background in the wordpress theme. Problem is the image is a static size - so when content goes past the image it is not re-sizing (due to the fixed width).

    How could I get this image to resize as I add more content?

    Many Thanks,

    Marc

  2. stvwlf
    Member
    Posted 4 years ago #

    don't combine the 3 images into one. Use them as 3 images just as you have in the XHTML site.

  3. CollagenUK
    Member
    Posted 4 years ago #

    Yeah thats what I've been trying to do. I'm finding it hard to get the three images together. In the XHTML site the H2 on the page had the top of the image as background - the body had the middle with y-repeat - and there was another div at the bottom for the bottom image.

    In my WordPress theme can I literally separate the content div into three sections and used each image separately?

  4. stvwlf
    Member
    Posted 4 years ago #

    Yes, you can add any HTML/PHP you want into a WP theme file.

    I do something like

    <div id="content_top"></div> -->assign top background image to content_top
    <div id="content">
        ==== WP loop and code here
    </div>
    <div id="content_bottom"></div> -->assign bottom background image to content_bottom

Topic Closed

This topic has been closed to new replies.

About this Topic