Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Help with...html? or css?...or  (Read 1216 times)

0 Members and 1 Guest are viewing this topic.
Help with...html? or css?...or
« on: November 20, 2007, 06:51:26 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 640
http://www.freewebs.com/randomedge/tilesets.htm
I'm crating a site and I have this code:(Which I supposed it's the code that make the problem happen...sorry I just started to create the site yesterday and I'm a n00b at this)
Code: [Select]
.nav a {
  display: block;
  padding: 1px;
  border-left: 1px solid #ade;
  border-right: 1px solid #ade;
  border-top: 1px solid #ade;
  border-bottom: 1px solid #ade;
}
.nav a:hover {
  text-decoration: none;
  font-weight: bold;
  background: #89C6E0;
  background-image: url(images/bg.gif);
  color: e7f9f8;
  border-left: 1px solid #1C4E66;
  border-right: 1px solid #1C4E66;
  border-top: 1px solid #1C4E66;
  border-bottom: 1px solid #1C4E66;
}
The problem is that as you see in that page, when the mouse goes over the line the link can be clicked...I just want the link to be able to be click when the mouse it's right over the word/pic...how would I fix this?
Logged
This is an english website, please speak it.
l0l wut? o_0
Re: Help with...html? or css?...or
« Reply #1 on: November 20, 2007, 07:26:30 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1645
Here you are! Tested in Firefox ;)

The CSS
Code: [Select]
.nav a {
 width: 28px;
}
div.content{
  display: block;
  padding: 1px;
  border-left: 1px solid #ade;
  border-right: 1px solid #ade;
  border-top: 1px solid #ade;
  border-bottom: 1px solid #ade;
}
div.content:hover{
  text-decoration: none;
  font-weight: bold;
  background: #89C6E0;
  background-image: url(images/bg.gif);
  color: e7f9f8;
  border-left: 1px solid #1C4E66;
  border-right: 1px solid #1C4E66;
  border-top: 1px solid #1C4E66;
  border-bottom: 1px solid #1C4E66;
}

The HTML of the content
Code: [Select]
<!-- Content Starts Here! -->

<div class="contenthead">GM6:</div>
<div class="content"><a href="tilesets/tileset_one.png"><img src=icons/icon_one.bmp></a></div>
<div class="content"><a href="tilesets/tileset_one.png"><img src=icons/icon_one.bmp></a></div>

<!-- Content End -->

What you actually did wrong, you made the whole <DIV> (content or whatever) in an <A>. And if you want the url only work on the image, you have to use a <DIV> for the content and make your <A> smaller that only covers your image as url :)
(sorry I'm bad in explaining my coding)
« Last Edit: November 20, 2007, 07:32:22 pm by TheRealDragonboy »
Logged
  • Virtual Security
Re: Help with...html? or css?...or
« Reply #2 on: November 20, 2007, 08:01:09 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 640
Still HAeppens.
Logged
This is an english website, please speak it.
l0l wut? o_0
Re: Help with...html? or css?...or
« Reply #3 on: November 20, 2007, 08:31:39 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1645
Still HAeppens.
Lol, you have to REPLACE the CSS of the whole .nav a and .nav a:hover! :P
Logged
  • Virtual Security
Re: Help with...html? or css?...or
« Reply #4 on: November 20, 2007, 09:15:08 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 640
oh man...and sorry for the HAeppens I was typing with one hand while my body was walking away...had to go somewhere...
I tried it and the menu on the left gets messed up...I guess I'll have to take some time to fix this later.
Thanks! ^^
Logged
This is an english website, please speak it.
l0l wut? o_0
Re: Help with...html? or css?...or
« Reply #5 on: November 22, 2007, 06:53:58 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1645
oh man...and sorry for the HAeppens I was typing with one hand while my body was walking away...had to go somewhere...
I tried it and the menu on the left gets messed up...I guess I'll have to take some time to fix this later.
Thanks! ^^
My script should work, you have to replace the CSS.
Logged
  • Virtual Security
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.015 seconds with 46 queries.

anything