Solved

HREF for image & 3 lines of text ...

Posted on 2016-08-08
8
61 Views
Last Modified: 2016-08-23
I am stumped ... How can I make this image and the 2-3 lines of text 'clickable"  ?   Do I have to HREF each individual item, or is there a way to wrap this whole set of code with 1 HREF, possibly using DIV tags?

I inherited the code ... it looks something like this:

              <a href="#">
                <div class="features-head">
                  <img src="img/thumb.jpg" alt=" ">                       
                </div>
                <div class="description-first">
                  <h4>Electrician</h4>
                  <p>Redesign and update your home</p>
                  <p>Be the first in your neighborhood</p>
                </div>
            </a>

Of course I tried changing the first line to:
<a href="pagename.php">
which didn't work.
0
Comment
Question by:bleggee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 41748194
Does this exist somewhere "in situ" so we can see the complete picture?  I can see nothing wrong with your anchor tag, so I think there may be something else involved that is causing your "clickable" issues.
0
 
LVL 1

Author Comment

by:bleggee
ID: 41748218
Sure.   If nothing obvious pops out to you, I am going to troubleshoot a little more. Learn stuff that way !  ;)   If I can't fix or isolate the issue, I'll send the info for the site page etc.
0
 
LVL 22

Expert Comment

by:Kim Walker
ID: 41748230
This would depend on what doctype you're using. The code you've presented is valid in HTML 5, but not in previous versions of HTML.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 110

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 41748561
This works the same in HTML4 Transitional and HTML5.  These are the two I see most often; didn't test other doctypes.
https://iconoun.com/demo/temp_bleggee_html4.php
https://iconoun.com/demo/temp_bleggee_html5.php
0
 
LVL 1

Author Comment

by:bleggee
ID: 41749625
Interesting about the HTML 4 vs 5. Looks like I have DOCTYPE for 5.

Here's the link to the test site. I am stumped:  http://responsivehost.com/
In the index.php file, there are 2 rows of 4. Top row links are not working. Bottom row of links are working fine.
I've attached the index.php and the 3 include files in case you need them.

Any help is appreciated!
RespHost.zip
0
 
LVL 22

Assisted Solution

by:Kim Walker
Kim Walker earned 125 total points
ID: 41749799
The problem is that a javascript error is being thrown whenever you click on the linked group of elements. The error is related to flexslider but I can't find any flexslider configuration. But then I'm not that familiar with flexslider so it may be able to work without any custom configuration. Do you intend to use flexslider on these linked groups of elements and what flexslider effect do you hope to trigger by clicking the linked elements group?
0
 
LVL 19

Assisted Solution

by:NerdsOfTech
NerdsOfTech earned 125 total points
ID: 41765528
try linking the LI elements instead.

<a href="test.php"><li>
...
</li></a>

Open in new window

0
 
LVL 1

Author Comment

by:bleggee
ID: 41765914
Thx all!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL limit and not so limited 13 42
JSON decode 5 21
Get data from two MySQL tables 6 30
write html in textarea and record it into a database table 3 16
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question