jeannedark Posted March 11, 2007 Share Posted March 11, 2007 Hello, I have a little problem with borders. I wanted to have borders for my images that I posted on my blog, so I wrote this text into CSS file: img { padding: 5px; border: 1px solid #9b9ba5; } but I want to exclude some images, like emoticons (they look very ugly with borders), but I have no clue how to do that and I haven't found nothing about it on the Internet. Could someone help me with this? Link to comment https://forums.phpfreaks.com/topic/42256-images-and-borders/ Share on other sites More sharing options...
wildteen88 Posted March 11, 2007 Share Posted March 11, 2007 Give your emoticon images an inline style of border: none; EG: <img src="./emoticons/smilie.gif" style="border: none;" alt="" /> Link to comment https://forums.phpfreaks.com/topic/42256-images-and-borders/#findComment-205000 Share on other sites More sharing options...
jeannedark Posted March 12, 2007 Author Share Posted March 12, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/42256-images-and-borders/#findComment-205492 Share on other sites More sharing options...
jcombs_31 Posted March 12, 2007 Share Posted March 12, 2007 That is one way, but I prefer to define elements in there section. For example, If I don't any images in my header to have borders, I would define the image within the header element #header img { border: none; } etc... Or you can make a no border class rather than doing the inline style each time .noborder { border: none; } <img class="noborder" src="..." /> Link to comment https://forums.phpfreaks.com/topic/42256-images-and-borders/#findComment-205605 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.