Jump to content

Images and borders?


jeannedark

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.