JustRob Posted May 24, 2012 Share Posted May 24, 2012 Hello, I'm making a website with a picture sprite for the horizontal menubar. Meaning, both the "normal" and "hover" states in one big image, beneath each other. But I have a problem, obviously I still need to put text in between the <a> tags, but how do I make that text invisible so only the image is displayed? Right now if you click and hold and move your mouse over the menu the text is selected, which is something I do not want. I've done this in the past, on my website http://www.robbertbruggeman.nl/, but I can't figure out for the life of me how I did it back then. Link to comment Share on other sites More sharing options...
eTianbun Posted May 24, 2012 Share Posted May 24, 2012 Display the <a> tags an block element.example: <a href="home.html" style='display:block'><!--No text needed here!--></a> Link to comment Share on other sites More sharing options...
JustRob Posted May 24, 2012 Author Share Posted May 24, 2012 (edited) I have that: .menubar a{ float: left; display: block; height: 100%; text-align: center; text-decoration: none; color: #FFF; width: 100%; background: url(menu/menubar.png) no-repeat;} But still no go. The text appears above the image. Edited May 24, 2012 by JustRob Link to comment Share on other sites More sharing options...
eTianbun Posted May 24, 2012 Share Posted May 24, 2012 I dont realy get you! If you dont want text between the <a> tags, why put it? Link to comment Share on other sites More sharing options...
JustRob Posted May 24, 2012 Author Share Posted May 24, 2012 Because otherwise there's nothing to click. I think. Link to comment Share on other sites More sharing options...
eTianbun Posted May 24, 2012 Share Posted May 24, 2012 Can i see the html? Link to comment Share on other sites More sharing options...
JustRob Posted May 24, 2012 Author Share Posted May 24, 2012 Oh, actually, I did remove the text and it seems to be working now. I didn't think that would work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now