Forums

Custom theme: using images as category links. help please (2 posts)

  1. wp@tobiasfeltus.com
    Member
    Posted 8 months ago #

    Hi there,
    I am rather slow and new at any dealings with PHP, and my CSS is rudimentary and based within table-built html sites. So thinks have taken me a long time to get to the point I have reached.

    What I am doing is building a simple site powered by WordPress so that it can be maintained by the user. The Header is built with DIV tags in a similar way to a table header:

    <div> (banner image)
    <div><div><div><div> (links to wp categories)

    The site is graphically constructed, using gifs. The only part that I have failed to figure out (I think) is how to make the link buttons to the categories work, and contain the image.

    I have tried using <img src> locally, as well as with http:// addresses, to no avail.

    I have tried defining the image as a background in the CSS for the header, and then using "transparent" text as the link in the DIV, but I have not managed to control the text of the link by defining a proprietary class.

    My current code that is not working (has the image, and visible text on top, working links) is as follows:

    CSS:

    [CSS code moderated - please follow the forum guidelines for posting and marking code]

    header.php

    <div id="Diary_">
                    <a class="transparent" href="index.php?cat=1"> DIARY </a>
                </div>

    (I had to remove the chevrons to make the code visible, rather than appearing as a link) [for how to post code in the forum, see http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

    The site is currently running off a localhost, but if it would help, I could put it onto its proper server to finish testing.

    Thanks a million,
    Tobias

  2. wp@tobiasfeltus.com
    Member
    Posted 8 months ago #

    Sorry, I forgot. It does work if I use external http:// addresses for the images as image source to the link, however they render poorly as GIFs, for some reason. The easiest solution, thus, would be to use JPGs for these buttons, however the Codex does not recommend having hard links to images outside the theme, hence my asking for help.

Reply

You must log in to post.

About this Topic