I want my anchors look like the same as a button element. I want this away rather than giving it a certain style because I want it to be rendered with user's operating system/browser's native preferences.
Here is a simple code I wrote to achieve this:
It renders perfectly, however doesn't work on most of the browsers. When you click on it;
<a href="ww...com" target="_blank">
<button type="button">click me</button>
- On Firefox: The link is opening twice, you will see two tabs opened for the same url
- On Safari: Working properly
- On IE6/7: The link is not working at all
Have you experienced with this? What would you suggest me? If there is no solution to this, could you please suggest me a good source where I can find button samples to be used as a background. (It would be great if it gives all images related to all states of a button)
Sounds like you want 'appearence:button'.
Otherwise maybe you could wrap a form around the button instead of a link.
Thanks for pointing me out the css appearance property, I wasn't aware of that.
It is the definite solution for browsers supporting or will support CSS3 but because I have to support IE6 and IE7 browsers it will not help me.