WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image for each sidebar block? (11 posts)

  1. Makki
    Member
    Posted 8 years ago #

    Hi I am making my first theme for wordpress and i have a question that the answer could decide wether i complete this or not. In the sidebar there is "Pages, Categories, Links etc and i need to know can i make it so there is like an image for each of them? Like say a box which contains pages and another for links?

  2. Kafkaesqui

    Posted 8 years ago #

    Just an image above or beside them, or is this to be a background image?

    The former simply involves using the img tag to place the images in the page (sidebar.php template, if your theme has one). The latter requires each *section* is in a div or other HTML element that is assigned a unique id, and then providing a background-image property to each id in your theme's stylesheet.

  3. Michael Bishop

    Posted 8 years ago #

    If each box is going to be the same, you could simply add <div class="box">, and then as Kaf says, in your style sheet you'd have .box {background-img: url(image.jpg)}

  4. Makki
    Member
    Posted 8 years ago #

    i am so freakin frustrated ugh. Could you please give me the exact way to enter the code into css. i have no idea and am tired of guessing.

  5. Mark (podz)
    Support Maven
    Posted 8 years ago #

    http://www.tamba2.org.uk/wordpress/1css/
    That should help - there is a link to the css.

  6. jafer
    Member
    Posted 8 years ago #

    The link for the tamba2 site doesn't show up in IE-based browsers (at least not right now for me) but it does show up using Firefox.

    UPDATE: It's showing now, but if there's any trouble seeing it, I guess switching over to using Firefox would work.

  7. Makki
    Member
    Posted 8 years ago #

    i think i am dumb blinda and maybe stupid but i dont get it lol help
    i enter the .box info you gave me above np but it dont do nothing so i wondering am i supposed to insert it in a certain place for it to work in sidebar and what i need type to be exact.

    sorry i no get it

  8. Mark (podz)
    Support Maven
    Posted 8 years ago #

    jafer - I just looked in IE6 and it's there - which version do you have ?

  9. jafer
    Member
    Posted 8 years ago #

    I'm using Avant Browser actually, which is IE-based, but I also have IE6. It is showing up now though. Was getting the error page - not available.

  10. Michael Bishop

    Posted 8 years ago #

    For each instance you want the box to show up, for instance where your links are you would begin with <div class="box">then the code for your links list, then </div>

    In your CSS, you would have
    .box {
    background-img: url(theactual path to your image.image exention, ie, box.jpg);
    }
    So for each instance you would have the <div class="box"> but only one instance on your style sheet.

  11. Makki
    Member
    Posted 8 years ago #

    Thanks so much miklb

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags