• Resolved Anonymous

    Hi,
    I’m a newbie to WP 1.2.1 and PHP…
    I’m trying to make an image map out of my header, but in my WP template (using kubrick) this is how the link is for the image:
    #headerimg { background: url(‘<?php echo get_settings(‘siteurl’); ?>/images/personalheader.jpg’) no-repeat top;}
    I know I have to use the usemap=”#mapname” with the <img src> part in HTML, but in this specific PHP template line, how can I add the image map command? Any way to get around this?
    Thanks a lot.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The section you’re looking at refers to css, not the html. Image maps use img tags, which are html. You need to add the tag wherever you want it to appear within the template. As such it has nothing to do with php, the php is server side and outputs html to your browser so that when viewed a raw html and a php generated page would look no different (apart from the actual content).
    Not being familiar with kubrick I can’t tell you where you would need to put your image map, although I assume from the css reference you want it as a header.

    Thread Starter Anonymous

    Hmm….thanks moisie, but I’m afraid, I’m no better off…
    Anyone else able to help me out? someone who uses kubrick? Thanks a lot.

    Hi,
    Take a look at this webpage — https://htmlhelp.com/reference/html40/special/map.html — for an example of what I think you’re trying to do.

    Thread Starter Anonymous

    Dubsky,
    I went there and it seems to be showing an alternative to the IMG tag for making the map (using Object?) but the thing that I’m totally confused about is how I can get it into this:
    #headerimg { background: url(‘<?php echo get_settings(‘siteurl’); ?>/images/personalheader.jpg’) no-repeat top;}
    like where could I add the map into this? Or is there a way that I can totally re-write this part so that it is in HTML instead of this get_settings kind of thing. Does anyone know how this would look if it was just written in plain html? If there was an <img> tag here instead of the get_settings thing, I would be able to add the usemap=”#mapname” tag easily.
    I’m very new to this so please excuse any obvious statements that I’ve made……thanks!

    Hi again,
    I think you’re confusing CSS with HTML. The bit which you have — the line starting with “#headerimg {…” is part of a CSS stylesheet. It has nothing to do with image maps.
    So to answer your question (“like where could I add the map into this?”) — Not here. ??
    Image maps — i.e. images which have “hotspots” in them which can be clicked on like following a normal hyperlink — are defined in HTML as described in the link I have you before (see above). They have nothing at all to do with CSS, trust me.

    https://www.silveragesoftware.com/handytools.html
    This site has a free image mapper program that is easy to use.

    Hmm I am also interested on how to do image mapping on my kubrick header.. I wonder how can I do it?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Image Map in PHP?’ is closed to new replies.