html - Implementing background image for A HREF in CSS -
I have an href in HTML that I dynamically generate from a server I created a good rounded corner GIF image Which I would like to use as a background, i.e. put text (in white) on the GIF image and it is still worth linking.
The current HTML looks like:
& lt; H2 & gt; & Lt ;! - img src = "picture / greenback.gif" - & gt; & Lt; An id = "site-title0" class = "titletext" href = "#" & gt; Crocodile Creek, Bowling Green Bay National Park & lt; / A & gt; & Lt; / H2 & gt; & Lt; Div id = "descrip0" class = 'description' & gt; 20 km S. Townsville $ 4.85 / night Gates pass ...
What is the best way to do this with CSS? It seems that I can use the relative position to move the text on the background image, but in the initial experiments, it affects the rest of the page.
Or, perhaps the best way to use CSS background image? As Daniel says, in fact:
a special->
I too - and it can be just personalized, influenced and received 'knowledge - Suggest to use .png
instead of .gif
. But, as has been said, this is probably a personal and subjective thing.
Answer the answer in response to Timibo's comment.
In addition, and it's not particularly beautiful, here's a code demo:
Comments
Post a Comment