Welcome to Dream.In.Code
Become an Expert!

Join 150,163 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,369 people online right now. Registration is fast and FREE... Join Now!




Anchor a div tag

 
Reply to this topicStart new topic

Anchor a div tag, anchor a div tag

Melificus
23 Aug, 2008 - 07:16 AM
Post #1

New D.I.C Head
*

Joined: 11 Dec, 2007
Posts: 20


My Contributions
I anchored a div tag and added an image inside that div tag. The whole thing works in firefox, but in IE the image doesnt want to be a link. The rest of the div box does. Is there something I am doing wrong?
CODE
<a href"blah"><div class="whatev"><img src="pic.jpg" /></div</a>


This post has been edited by Melificus: 23 Aug, 2008 - 07:16 AM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Anchor A Div Tag
23 Aug, 2008 - 07:19 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
If you want just the image to be a link why not use


HTML
<div class="whatev"><a href"blah"><img src="pic.jpg" /></a></div>



Also, if you look at the source you provided you're missing a closing bracket (your div doesn't have a closing bracket). This

HTML
<a href"blah"><div class="whatev"><img src="pic.jpg" /></div</a>


Should be

HTML
<a href"blah"><div class="whatev"><img src="pic.jpg" /></div></a>

User is offlineProfile CardPM
+Quote Post

Melificus
RE: Anchor A Div Tag
23 Aug, 2008 - 07:23 AM
Post #3

New D.I.C Head
*

Joined: 11 Dec, 2007
Posts: 20


My Contributions
QUOTE(PsychoCoder @ 23 Aug, 2008 - 08:19 AM) *

If you want just the image to be a link why not use


HTML
<div class="whatev"><a href"blah"><img src="pic.jpg" /></a></div>



Also, if you look at the source you provided you're missing a closing bracket (your div doesn't have a closing bracket). This

HTML
<a href"blah"><div class="whatev"><img src="pic.jpg" /></div</a>


Should be

HTML
<a href"blah"><div class="whatev"><img src="pic.jpg" /></div></a>



I want the whole box to be a div tag though, and that was just an example of what I had, it isnt the exact thing
User is offlineProfile CardPM
+Quote Post

Melificus
RE: Anchor A Div Tag
23 Aug, 2008 - 08:26 AM
Post #4

New D.I.C Head
*

Joined: 11 Dec, 2007
Posts: 20


My Contributions
I just changed the cursor and made the image a background img. but thanks for trying to help
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 02:49AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month