Jump to content

image HREF not clickable HTML

Go to solution Solved by minibois,

You're not closing the DIV just above the link.

The code otherwise looks good.

		<div class="headers"
<a href="index0.html"><img src="logo.png" width="50" height="50" title="Home" alt="Flower"></a>
</div>

im using that code, it makes what shown in the picture.

 

(off topic)

should i use the flavor of the forum or programming?

(off topic)

 

the css is

.headers {
  padding-left: 10px;
  background: black;
  color: white;
  background-color: black;
}

when i click at the picture, nothing. the href does not even show itself as a link.

 

HELP?

Ca2pture.PNG

Link to comment
https://linustechtips.com/topic/1077443-image-href-not-clickable-html/
Share on other sites

Link to post
Share on other sites

You're not closing the DIV just above the link.

The code otherwise looks good.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to post
Share on other sites

Just now, ughiwanthackintosh said:

Sorry i cant find what your talking about every div is closed,  were you referring to main nav? because thats above the link, and every div there is closed.


		<div class="main-nav"></div>
		<ul class="main-nav">
		    <li><a href="index2.html"> License </a> </li>
			<li><a href="index3.html"> Downloads </a> </li>
			<li><a href="index5.html"> Contact Us </a> </li>
			<li><a href="index4.html"> Privacy & Policies </a> </li>
			<li><a href="index6.html"> Login </a> </li>
			<li><a href="index6.html"> Signup </a> </li>
			<div style="margin-top:-36%;margin-left:-10%;width:56%;padding:2%;height:50px;font:17px/17px sans-serif;color:white;text-shadow:1px 1px 5px black; background:url(none);">
	    </ul>
		
		</div>	

 

See the first line in the code your posted, the DIV on this line is not closed:

<div class="headers"

It's missing the > at the end.

But anyways, to troubleshoot you can do a couple things:

- Change the link to an absolutely link. What happens if the link is something like "https://Google.com"? A known working link?
- Right click > inspect element. This is a web dev's best friend, as it can easily show errors and things that are not functioning well, plus give you the ability to make changes 'on the fly'.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×