How to set up a link

  • Thread starter Thread starter Helpful person
  • Start date Start date
H

Helpful person

I have a web page at www.snowfisher.com

Towards the right side of the page I have a DIV containing some lists
with a background picture that reads Click. I want this to be a
link. However, I do not see how to accomplish this. One problem is
that the <A> element is in line and hence cannot contain block
elements.

I can probably use Javascript, detecting the onmouseover event.
However, is there a simpler way? Is there a better way to structure
the page that makes this easier?

(I want the text in the lists because it helps give me a high placing
for search engines.)

www.richardfisher,com
 
Helpful person said:
You missed the point. I need the text in place. An inserted image
will not cover the whole of the DIV element.

With all due respect, I think it's you who missed the point. Corey
understood your post and his reply was spot on. You can't make a background
image into a link - you have to use something else. The URL he provided
shows a complicated, convoluted way of working around that limitation, but
even the person who offered the technique says that it's a bad idea.

You could make all of the text into one big link, style the text however you
want with CSS, and leave the background image there. Linked text is even
more useful for SE purposes.
 
You could make all of the text into one big link, style the text however you
want with CSS, and leave the background image there. Linked text is even
more useful for SE purposes.

--
Patty Ayers |www.WebDevBiz.com
Free Articles on the Business of Web Development
Web Design Contract, Estimate Request Form, Estimate Worksheet
--

How do I make the formated text into a link? I believe it is not
allowed to include block elements inside the inline <a> element? (By
the way, I never expected to be able to make the background image into
a link.)

www.richardfisher.com
 
Wrap the whole outer div in a link tag

<div>
<a href="#"><!-- mini inset -->
<div class="mini_inset floatright" >
.....
</div>
</div></a>


_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| On Sep 14, 9:22 pm, "P@tty Ayers"
| > You could make all of the text into one big link, style the text however you
| > want with CSS, and leave the background image there. Linked text is even
| > more useful for SE purposes.
| >
| > --
| > Patty Ayers |www.WebDevBiz.com
| > Free Articles on the Business of Web Development
| > Web Design Contract, Estimate Request Form, Estimate Worksheet
| > --
|
| How do I make the formated text into a link? I believe it is not
| allowed to include block elements inside the inline <a> element? (By
| the way, I never expected to be able to make the background image into
| a link.)
|
| www.richardfisher.com
|
 
Wrap the whole outer div in a link tag

<div>
<a href="#"><!-- mini inset -->
<div class="mini_inset floatright" >
....
</div>
</div></a>

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________
I don't think you can put a div (block element) inside a <a> (inline
element).

www.richardfisher.com
 
Helpful person said:
Wrap the whole outer div in a link tag

<div>
<a href="#"><!-- mini inset -->
<div class="mini_inset floatright" >
....
</div>
</div></a>

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________
I don't think you can put a div (block element) inside a <a> (inline
element).

Maybe not, with a strict doctype. You could try wrapping every <li></li>
with <a></a>. If that doesn't work, I don't know. If I were in this
situation I would think of another design to provide an equal amount of
spider food and also provide that particular hyperlink.
 
Back
Top