applying background image to link tag
I need to apply a button like background image to the link tag.
Im using a <UL> and its <li> element are added dynamically.
The elements are <a href=> link tags added by inner HTML as below:
var n = document.createElement("li");
n.innerHTML='<a href="#" onclick="getDetails()">value</a>';
I need to apply a background image to the above link tag.
The image should be resized properly along with the text and the text should
be aligned center.
Please help me.
Thanks in advance.
You can't resize background images client side.
The image should be resized properly
Perhaps you mean resize the link?
Yep background images in CSS don't scale they can only be clipped.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread