The code that surrounds the background image:
Code:
<body class="<?php echo OsBrowser::getCssClass(); ?>">
<div id="back">
<a title="Crystal Saga" href="http://cs.r2games.com"></a>
</div>
<!-- Top -->
<a name="top" id="top"></a>
<div class="topbg"></div>
<!-- Wrapper // -->
<div class="wrapper">
<!-- Header // -->
<div class="header">
This code is what creates the background image:
Code:
<div id="back">
<a title="Crystal Saga" href="http://cs.r2games.com"></a>
</div>
Here's my css:
Code:
#back {
height: 900px;
position: absolute;
text-indent: -9999px;
width: 100%;
z-index: 0;
}
#back a:link {
background: url('img/gameinfo_bg.jpg') scroll center top;
display: block;
height: 100%;
width: 100%;
}
Now, my question is how do I make it so that it acts like the background image on mmorpg.com where the top section of the background image is clickable?
UPDATE:
I solved the problem. Basically, I had to alter the code up a bit. The theme I am using for my site uses a a header class that basically pushes the content area below the main and submenus. The header area class was preventing the top area of the background image to not be clickable even if I had the code done correctly. So what I had to do was remove the code from the div so that only the div was there and the background image would show up but no link and then I copied the div and code and pasted it right below the header class code. I'm not really sure why it worked but by putting the div and the code below the header class code, the header area was no longer dominating the link, which made the top area clickable. Leaving the div code up near the code allowed the entire background image to show up but I had to move the code below the header class so the area itself in the image would work.
Code:
<body class="<?php echo OsBrowser::getCssClass(); ?>">
<div id="back">
<!--<a title="Crystal Saga" href="http://cs.r2games.com"></a>-->
</div>
<!-- Top -->
<a name="top" id="top"></a>
<div class="topbg"></div>
<!-- Wrapper // -->
<div class="wrapper">
<!-- Header // -->
<div class="header">
<div id="back2">
<a title="Crystal Saga" href="http://cs.r2games.com"></a>
</div>
Code:
#back {
background: url('img/gameinfo_bg.jpg') scroll center top;
height: 900px;
position: absolute;
text-indent: -9999px;
width: 100%;
z-index: 0;
}
#back a:link {
/*background: url('img/gameinfo_bg.jpg') scroll center top;*/
display: block;
height: 160%;
width: 100%;
}
#back2 {
}
#back2 a:link {
/*background: url('img/gameinfo_bg.jpg') scroll center top;*/
display: block;
height: 160px;
width: 100%;
}