![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Howdy, I am interested in using a CSS class to create a border around images on my website. I checked online and found the following: img { border: 5px #FFFFFF; } |
|
http://blog.extensioneering.com/ WebAssist Extensioneer Adobe Community Expert |
#4
| |||
| |||
|
|
rob-ought wrote: Howdy, I am interested in using a CSS class to create a border around images on my website. I checked online and found the following: img { border: 5px #FFFFFF; } Don't use tag names as CSS class names, you're only inviting trouble. |
|
This CSS selector says to apply a border to img tags. If you really want to use a CSS class names img, then it may need to look like (note the dot at the beginning): .img { border: 5px #FFFFFF; } |
#5
| |||
| |||
|
|
Don't use tag names as CSS class names, you're only inviting trouble. Please elaborate. I use element selectors all the time where necessary. Either standalone or as part of descendant selectors they help to keep the HTML clean and free from too many classes/IDs. And BTW - a tag name is _not_ a class. Completely different thing. |
|
http://blog.extensioneering.com/ WebAssist Extensioneer Adobe Community Expert |
#6
| |||
| |||
|
|
[...] however I was pointing out that they probably shouldn't be using a tag name as a class name, as that can minimally lead to confusion as to what the styles are supposed to be applied to. |
![]() |
| Thread Tools | |
| Display Modes | |
| |