By AndrewE on
Would someone be so kind as to remind me how to make a masthead image clickable in php code. I learnt it once but have forgotten. I seem to remember implementing it in the theme css file.
Thanks indeed.
F.Q.
Would someone be so kind as to remind me how to make a masthead image clickable in php code. I learnt it once but have forgotten. I seem to remember implementing it in the theme css file.
Thanks indeed.
F.Q.
Comments
Something like this
In php code you would do something like
Where your replace source_file with the appropriate path to the image and $path is the path you wish to refrence (such as node/5).
You rawwwk!
Wow, I struck lucky today, 2 queries and 2 great replies within an hour. The drupal community has my respect.
Thanks.
F.Q.
TGR - a writer's space | mechanical i
This is how my css looks
My header image is called b5.jpg and I want to link it simply to the 'home' page which is the url of my site: http://www.tgr.writerspace.net/
Using your suggested code above what is the best way to go about this without me messing it up?
Much obliged,
F.Q
TGR - a writer's space | mechanical i
background images are a different story
Since you are using a background image the answer is different. The simple anwser is as far as I know you can't make the background image clickable. You can make the header html clickable with some javascript but then it becomes browser dependent. The other way is to move the image into a img tag in the template that generates the HTML. Details for this will vary depending on which template you are using. Which template system are you using?
I am interested in knowing
I am interested in knowing how to make a background image used as the site header clickable. Using a phptemplate-based theme.
Can anyone help me?
I just found a cool way to
I just found a cool way to do this.
Create a single transparent pixel in gif format. Don't use png or you'll have problems in IE6. Save it as pixel.gif and add this link at the top of your header div.
You can mess with the dimensions to get the right size.
thanks!
Only to thank you for the solution of a problem that bothered me two weeks!
Regards,
Cornel
Cool!
This is a very elegant solution.