mr.musicman mr.musicman - 1 year ago 88
HTML Question

a href not clickable

I have a simple blog on wordpress and I'm trying to make the header title to be a link to the homepage. I went into header.php and rewrote the script for that part, but still can't get a link to work.

This is what I re-wrote:

<a href="" style="cursor:pointer !important;">My Spiel</a>

I know that the href is being registered because of the css color change.

This is what the previous code was:

if ($balloons_option['balloons_site-title_line1'] == '' && $balloons_option['balloons_site-title_line2'] == '') { ?>
This is a<br />
WordPress theme
<?php } else {
echo $balloons_option['balloons_site-title_line1']; ?><br />
<?php echo $balloons_option['balloons_site-title_line2'];
} ?>

I originally tried putting the href outside the h1, but still no luck.

Is there some buried Wordpress setting that disables a clickable title? Or is there some javascript that I should be looking out for that is disabling it?

I should also note the css for the header contains a z-index. I read somewhere that it might be effected by that:

#header .content {
line-height: 18px;
margin: 0;
z-index: 4;

If the z-index is effecting it, why is that?

Answer Source

Change z-index property on line 37 of layout.css to

#header h1 {
position: relative;
z-index: 10; /* Was 2 */

Your .entry (z-index:4) div goes vertically from top to bottom covering your #header with a higher z-index than your h1 z-index (2). So your h1/Anchor wsa unclickable because it was "under" another div.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download