a href not working in Google Chrome aaarghhh!
a href not working in Google Chrome aaarghhh!
Author
Discussion

mondeoman

Original Poster:

11,430 posts

286 months

Tuesday 2nd February 2010
quotequote all
I've been working on this most of the day, and what little hair I had left has now gone.

I'm sure this is going to be a beginners mistake, but I can't find a thing about it anywhere.

The site works in IE8, displays OK in Chrome and Firefox, but the <a href > tag for images and text in the main body doesn't work in Chrome or Firefox. They both recognise that its there, as the text does pick up the a class styles from the CSS sheet, but the links don't prompt a cursor change for clicking.

Pages is here

I've used the same code and techniques on other parts of the page and they work , but that damned image just wont do it.

Any ideas?

ovlovist

462 posts

224 months

Tuesday 2nd February 2010
quotequote all
Maybe caused by the unclosed <div> ?:

http://validator.w3.org/check?uri=http://www.sprin...

The errors on line 106 look a bit suspicious..

mondeoman

Original Poster:

11,430 posts

286 months

Tuesday 2nd February 2010
quotequote all
Thanks,

caught that one, but its not the prob.

Could it be a height / block issue?

evenflow

8,829 posts

302 months

Tuesday 2nd February 2010
quotequote all
Firefox 3.5.7 here.

If you disable the stylesheet, the links work correctly so that may have narrowed down the problem.

Just trying a few more ideas...

JohnnyPanic

1,282 posts

229 months

Tuesday 2nd February 2010
quotequote all
mondeoman said:
Thanks,

caught that one, but its not the prob.

Could it be a height / block issue?
Developer tools in Chrome don't seem to be acknowledging the <a> tags in the left nav at all

I would try making the <a> display:block with a fixed width, height & line-height and setting the PNG as the background image in the CSS.

Then you'll just end up with <td><a href="contents-help.shtml">Contents and Help</a></td>

king arthur

7,514 posts

281 months

Tuesday 2nd February 2010
quotequote all
Could be the negative z-index value, which puts your main table behind the body layer?

evenflow

8,829 posts

302 months

Tuesday 2nd February 2010
quotequote all
I *think* it's the z-index in #content not appearing "above" #page-background

...still trying some other things...

mondeoman

Original Poster:

11,430 posts

286 months

Tuesday 2nd February 2010
quotequote all
king arthur said:
Could be the negative z-index value, which puts your main table behind the body layer?
You star!!!

Changed that to 2 and its working fine.


mondeoman

Original Poster:

11,430 posts

286 months

Tuesday 2nd February 2010
quotequote all
evenflow said:
I *think* it's the z-index in #content not appearing "above" #page-background

...still trying some other things...
Changed that one as well - thats one of the problems of borrowing chunks of html from the web lol

evenflow

8,829 posts

302 months

Tuesday 2nd February 2010
quotequote all
Right:

- Remove "height:100%;" from the html,body stylesheet entry
- Comment out the #page-background entry

...and the links work

If you are using the #page-background div as a place to put a background image, try using the background-image attribute in the stylesheet rather than within the main body. That is:

In the stylesheet for example:

  1. page-background { background-image:url('images/image.gif'); margin:0; padding:0; }
Then in the main body:

<div id="page-background"> </div>

Sorry, in a bit of a hurry, hth.

ETA: Ah, sorted with the z-index, cool


Edited by evenflow on Tuesday 2nd February 22:33

mondeoman

Original Poster:

11,430 posts

286 months

Tuesday 2nd February 2010
quotequote all
evenflow said:
Right:

- Remove "height:100%;" from the html,body stylesheet entry
- Comment out the #page-background entry

...and the links work

If you are using the #page-background div as a place to put a background image, try using the background-image attribute in the stylesheet rather than within the main body. That is:

In the stylesheet for example:

  1. page-background { background-image:url('images/image.gif'); margin:0; padding:0; }
Then in the main body:

<div id="page-background"> </div>

Sorry, in a bit of a hurry, hth.

ETA: Ah, sorted with the z-index, cool


Edited by evenflow on Tuesday 2nd February 22:33
Aye, that and using "position:absolute" instead of "position:fixed" which kept the header at the top of the screen as the body scrolled up, but the body was going over the top of the header, so I was trying to work around that with z-index and ended up tying it all in knots.

Thanks to all for the quick responses, much appreciated.

TonyToniTone

3,878 posts

269 months

Wednesday 3rd February 2010
quotequote all
mondeoman said:
I've been working on this most of the day, and what little hair I had left has now gone.
Out of interest is this going to be an iprofile type site?

mondeoman

Original Poster:

11,430 posts

286 months

Wednesday 3rd February 2010
quotequote all
No, way more than that.

CVs are just part of preparing to change jobs/careers, especially when you've been made redundant - this is part of an demo of a much more substantial system.

Give it another few days and it'll all be done. I'm getting to hate html!! smile