2 tilqicom Nov 05, 2010 13:52

I tried inserting this:
img {
border-color:#cbac26;
}
but I still get a black border. Does it have to go somewhere specific? I just dropped it on the line below
a img {border:0px; vertical-align:middle;}
(my line 107).
The result can be seen here: http://66.114.45.2/~kcltorg/index.php/BuyingaHome/
Use this code instead, otherwise all images in you site will get a border (icons, logo, header etc).
.post img { border: #cbac26 1px solid }
Black image border is hard-coded in the post.
<img style="float: left; border: 1px solid black; margin: 5px;" src="/%7Ekcltorg/media/blogs/BuyingaHome/home1.jpg" alt="" height="150" width="220" />
Ok, I think what you've pointed out is that what I'm trying to do won't work. I was trying to make it so when I create a post, insert a picture, then right click on the picture and choose "Insert/Edit Image" and put a border on it, say 1, the border is whatever color I've specified in the css file. This way, I wouldn't have to have my client edit html to change the border color every time they put a new image in. But as you've pointed out, when this is done using the WYSIWYG editor, the code is automatically generated using specifically a black border. I'm assuming there's no way around this...?
!!!UPDATE!!!
Ok, I tried your suggestion and it seems like a great workaround. It automatically generates a 1px border of the color I've forced in the css. Then, to override, I can go ahead and mess with the WYSIWYG controls if necessary. Great solution...as usual!
If you want to force border color, just add the "!important" flag.
.post img { border-color: #cbac26 !important; }
The color will always be orange regardless of what you have hard-coded in a post.
<img style="border: 1px solid black" ... />
The border will still be orange
img {
border-color: red;
}