gffects Posted May 10, 2012 Report Posted May 10, 2012 Hi there I was trying to make a new kind of navigation and this time i made my ul and li have a div inside of the anchor tag and it works great but according to w3c this is not allowed is there anyway to bypass this. the code is as follows: <div id="navigation"><ul> <li><a href="#"><div id="home"></div></a></li> <li><a href="#"><div id="portfolio"></div></a></li> <li><a href="#"><div id="contact"></div></a></li> <li><a href="#"><div id="about"></div></a></li> <li><a href="#"><div id="testimonials"></div></a></li> <li><a href="#"><div id="services"></div></a></li> <li><a href="#"><div id="blog"></div></a></li> <li><a href="#"><div id="rss"></div></a></li> </ul></div> The reason I tried to do it this way was that I could use the divs image as the buttons so I could make it look like whatever I please without too much coding involved. Perhaps if its was the button tag insted of a div tag it may work any advice would be greatly appreciated. Quote
newseed Posted May 10, 2012 Report Posted May 10, 2012 (edited) Use <span> tags instead. Of course you don't have to use span tags...why not apply your image buttons to the anchor tags? <div id="navigation"> <ul> <li><a href="#" id="home"></a></li> <li><a href="#" id="portfolio"></a></li> <li><a href="#" id="contact"></a></li> <li><a href="#" id="about"></a></li> <li><a href="#" id="testimonials"></a></li> <li><a href="#" id="services"></a></li> <li><a href="#" id="blog"></a></li> <li><a href="#" id="rss"></a></li> </ul></div> Just use css to apply your image buttons including any hover effect. Edited May 10, 2012 by Eddie Quote
gffects Posted May 10, 2012 Author Report Posted May 10, 2012 so use them in exactly the same way as the divs? just span then change the css to the span ids thanks i'll do that and test it again. Quote
newseed Posted May 10, 2012 Report Posted May 10, 2012 so use them in exactly the same way as the divs? just span then change the css to the span ids thanks i'll do that and test it again. Read my last post again because I have since edited it. Quote
gffects Posted May 10, 2012 Author Report Posted May 10, 2012 Excelent it works great thank you very much I had to make them as blocks for them to show but it works fantatic thanks very very much eddie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.