WordPress.org

Support

Support » How-To and Troubleshooting » Background Image in a post

Background Image in a post

  • I am trying to put Background image in a post so that i can have text written on top of it. But there is no such option the post editor and the html editor rejects and background image source code. How should i get this thing done?

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    @esmi

    Forum Moderator

    You would need to start editing your theme’s CSS – possibly via a child theme.

    I have no idea of css. But how can editing a theme help in using a background image in a post?

    Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    I have no idea of css.

    That’s unfortunate as that’s how you would add a background image to a post.

    Quoting Esmi from an earlier posting:

    Start learning how to use CSS:
    CSS Tutorials
    Learning CSS

    Can’t this get easier? I just need to add a background image to a post. No code format where i can just put the image file address?

    esmi

    @esmi

    Forum Moderator

    Sorry but no. You need to learn how to use CSS.

    Thanks, seems i need to get my hands dirty to achieve this.

    You can add a background image within the post itself using in-line styles quite easily (no CSS required).
    I’m no expert and maybe it’s not the correct way to do things (not sure how cross browser compatible it is) though I have achieved it using code like this (for example):

    <div style="background-image: url('url here'); background-repeat: no-repeat; height: 500px; width: 500px; margin-top: 0px;">
    <p style="padding: 0px 0px 0px 10px;">Text here.</p></div>

    Just adjust the height and width and padding as required.

    Hope this helps.
    Experts, feel free to shoot me down if I’m wrong 🙂

    I think you can edit your CSS code. Just add a code that will add the background to your post.In other way. just use in-line styles.Try this maybe it can help you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Background Image in a post’ is closed to new replies.
Skip to toolbar