Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding style to the img tag

Status
Not open for further replies.

danima

Programmer
Jan 9, 2002
134
CA
Maybe a dumb question...but can you add style to your image tag? I'm trying but I don't see any results.

thanks in advance
 
I have an image gallery that utilizes a gallery tool that the web administrator can easily add or delete photos on the site. They browse and upload photos and they appear as thumbails on the site that have a larger view when you hover over the thumbnail.

So, I wanted to put a frame/border around the picture and maybe some other styles to spice it up a bit.

I started with thisinside the img tag
style=" border-color: 1F1D5B;"
 
Is there a pre-existing border around that image? Because if it is not, then you just told what color that border should be. You need to specify its width and style as well, e.g. [tt]border: 1px solid #1F1D5B;[/tt]. Incidentally, you need to prepend a hash character to your colour values.
 
I knew it was simple...but I was having a brain-drain moment and when I Googled it I wasn't getting what I was looking for. Thanks man!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top