Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Using heading tags in links - need alternative to validate
Old 02-17-2008, 04:15 PM Using heading tags in links - need alternative to validate
Junior Talker

Posts: 4
Location: New Hampshire
Trades: 0
Take a look at my secondary navigation (the left nav) at localwebstudio.com/faqs. I'm looking to get a similar effect. Each link has two text styles - one styled with an <a> tag and the other styled with an <h5> tag.

This doesn't validate because I can't have a block element (h5) inside of the inline element (a).

I like how it works now... I just want to get it to validate. Can anyone think of the best way to accomplish this?

Thanks for the help,

Todd Allison
taallison is offline
Reply With Quote
View Public Profile Visit taallison's homepage!
 
 
Register now for full access!
Old 02-17-2008, 04:25 PM Re: Using heading tags in links - need alternative to validate
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
You could change <h5> to a span tag. And simply add the same elements to this.

Add this into your CSS

Code:
.navspan {
	color: #363B74;
	font-size: 1em;
	margin: 0px;
	padding: 5px 5px 0px 8px;
And replace all the <h5>'s inside the 'a' tag with this:

Code:
<span class="navspan">Your link text here</span>



This also validates.
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 02-17-2008, 04:28 PM Re: Using heading tags in links - need alternative to validate
Super Moderator

Posts: 1,584
Location: Kokkola, Finland
Trades: 1
there's no reason for them to be <h5> s anyways -maybe these "Web Presence" could be headings - say h2 or h3 but not the links
davemies is offline
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 02-17-2008, 05:03 PM Re: Using heading tags in links - need alternative to validate
Junior Talker

Posts: 4
Location: New Hampshire
Trades: 0
Thanks Gilligan - that worked.

I stayed away from using spans because I would still have to use a <br /> to get the effect. For some reason I thought <br> tags within an <a> tag still wouldn't validate - but they do.

Now to fix everything.

Todd
taallison is offline
Reply With Quote
View Public Profile Visit taallison's homepage!
 
Old 02-17-2008, 05:14 PM Re: Using heading tags in links - need alternative to validate
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
the simplest way is to put the <a>nchors inside the heading and make them display:block.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-18-2008, 02:27 PM Re: Using heading tags in links - need alternative to validate
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Chris's suggestion - the simplest - would also be the most semantically correct.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Using heading tags in links - need alternative to validate
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.56658 seconds with 12 queries