View Full Version : Confusing html issue...

02-11-2013, 11:03 PM
As some of you may see, this is my third post in as many days so sorry for all the questions. I am learning so hopefully will be helping other people out before long!

This is a really odd one.

The page is here http://www.magnetikmedia.co.uk/new1/index.html The 6 images at the bottom (web design, social media etc.) are just images, they aren't linked to anything yet however that whole area (ie. any of the images) seems to be one big link to this page http://www.magnetikmedia.co.uk/new1/social-media.htm and I can't understand why. The last link on the flash banner is the social media page so looks like the flash banner is somehow dragging that link right down.

Interestingly, Dreamweaver gives me an 'Invalid markup' error on the last link of the banner (to the social media page) so this must be related. The message is 'marked invalid because it doesn't belong inside the tag it's in and an online validator appears to refer to the '>' symbol here (in red) <a href="social-media.htm"><img src="images/socialmedia_hpage.png" alt="Social Media" />

I've looked and looked but can't see anything wrong.

Can anyone help?

02-12-2013, 02:35 AM
<!-- snip -->
<div id="slider-wrapper">
<div id="slider" class="nivoSlider">
<a href="about.htm"><img src="images/aboutus_hpage.png" alt="About Us" />
<a href="web-design.htm"><img src="images/design_hpage.png" alt="Web Design" />
<a href="animation.htm"><img src="images/animation_hpage.png" alt="Animation" />
<a href="social-media.htm"><img src="images/socialmedia_hpage.png" alt="Social Media" />
<!-- etc. -->
Right about line 65, you have an opening anchor tag (the one with href="social-media.html") which has no matching closing tag.

Actually, none of those hyperlinks are closed, but Chrome (and most likely, other browsers too) is "fixing" your markup and closing the other hyperlinks when it comes to the next opening tag (since anchors cannot be nested (that's probably the error you're referring to)). However, you shouldn't rely on browsers guessing what you meant - fix it yourself! :)