Forum Moderators: open

Message Too Old, No Replies

Problem with last link

My a:hover goes active erroneously

         

SaminOz

3:49 am on Feb 1, 2009 (gmt 0)

10+ Year Member



This is my first post (and had a heck of time trying to subscribe too!)

Anyway - my issue is a <li> of <a> tags in a <div> which is #2 of 4 which float-left on a page (you can see the page at < url removed >). The last item of the list responds to a:hover whenever a mouse floats over <div>'s 3 and 4 which are adjacent.

Nowhere near the link itself - I'm perplexed and wondered if anyone can help me get on the track of this?

Cheers,
Sam.Oz

[edited by: tedster at 4:48 am (utc) on Feb. 1, 2009]

tedster

4:51 am on Feb 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello SaminOz, and welcome to the forms.

This sounds like one or more of your <a> elements is missing its </a> - have you validated your mark-up?

W3C Validator - HTML [validator.w3.org]

SaminOz

9:34 am on Feb 1, 2009 (gmt 0)

10+ Year Member



Thanks Ted - nothing like a good humbling :)

tedster

6:17 pm on Feb 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The reason I could guess about that is that I've done it, too - so I recognize the symptoms now. And I eat the same humble pie. Code is like that!

g1smd

11:46 pm on Feb 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is but one example that refutes the assertion made by many that "validation is a waste of time".

For me it's a vital step, either via the W3C site, or via the Validator extension for Firefox; often combined with Firebug to examine the element tree and the CSS for problems.

tedster

12:32 am on Feb 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Exactly. Just this past week I was working with a ranking problem for a website with a PR 8 home page. There was a home page link with the target phrase in anchor text, just one of about 50 total links on that page. That "should have" sent enough link juice to at least show up somewhere! But the site wasn't ranking for that phrase - not at all!

I didn't write this particular source code, but they had exactly the same problem as this thread - an unclosed anchor tag. However, they weren't fortunate enough to see any browser symptoms because in this case the browser error-recovery routines adapted to it. In fact, there were over 1,000 characters before the open anchor tag was finally closed.

This is not to say that 100% valid code is a "must have" in every case. But we sure do need to know about the errors that come up and decide if they can/should be fixed.

SaminOz

12:43 am on Feb 2, 2009 (gmt 0)

10+ Year Member



I should have validated earlier (just as a way of uncovering the problem anyway) - I normally wait until all is complete - it's a great tip though for next time I run into a brain teaser (or am just acting downright blind!) - thanks so much for the tips - very helpful - Sam.

tedster

1:29 am on Feb 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Validation is also a good first step when working on cross-browser display problems. Some of those are literally IMPOSSIBLE to fix unless the coding errors are handled first.

I normally work in Homesite and I now use the built in validator after EVERY save when I'm developing a layout. I'm also pretty disciplined about using it after every edit as the site evolves - I've been bitten once too often!

simonuk

9:11 am on Feb 3, 2009 (gmt 0)

10+ Year Member



100% agree

My bug fixing time was reduced hugely reduced once I decided to write valid code.

Only other tip I have is get it working in FireFox first then fix for IE if needed. If it works in FireFox then it will work in most browsers.