WordPress.org

Ready to get started?Download WordPress

Forums

[Theme Twenty Eleven] images around h1 text (6 posts)

  1. Elenwen
    Member
    Posted 1 year ago #

    What I want: the h1 text itself in a white space, a (background) image around this

    the problem with simply using a background image for h1 is that the white space the text appears in has to be dynamic (as in lager for longer text, smaller for shorter).

    could anyone help me with this?

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    I don't think it's possible to do that within the same div element -- so you'd likely need to add another div around the h1 -- make that white, and put the image as a background in the outer div. That would involve modifying the header.php file and the CSS -- how much coding experience have you?

  3. Elenwen
    Member
    Posted 1 year ago #

    A little, I can do small modifications to both CSS and php. Your suggestion really sounds like the way to do it, but I don't think I can do this myself (I already spent way to much time trying out a few approaches).

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Do you have a child theme set up - -that's a must if you are going to change anything in the theme:

    http://codex.wordpress.org/Child_Themes

  5. Elenwen
    Member
    Posted 1 year ago #

    Yup, I do.

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    It might not be that hard to do what you want -- you could try it in a new header.php file in your child theme -- if it doesn't work, just chuck that file :). Do you have the background image already set? Can you post a link to your site?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags