0
How to apply CSS to a <a href=...> tag?
Hi guys, How do I apply CSS to a <a href=...>image</a> tag with a image between them? For example, I want internal CSS to change the width of the following: <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="An orange cat sitting down."></a> The .class tag is ".larger-image" within <style> tags within the <head> section. Now, how would I apply this to the <a href=...> image tag? would I create a new tag or place it within that same tag? Can you give me an example if possible. That would really help. Thanks very much. :-)
4 Respuestas
+ 1
Do you have an example or an attempt in the code playground. Add it to this post for easier help.
+ 1
I've found out the answer now. Thanks anyway though.
+ 1
Sorry I was away. Glad you got it figured out though
0
It's not something I've done on here. I've started it myself on Notepad++, but I regularly use Solo Learn to improve my coding skills.
This is the internal styling in the <head> section:
<style>
.smaller-image {
width: 200px;
}
</style>
I now need to apply this (class) to the <a href> tag (which encloses an image) which is located in the <body> section:
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="An orange cat sitting down."></a>