Page 1 of 1

No border on logo

Posted: Tue Jan 12, 2010 6:30 pm
by masha4
I need help with how I can add a border to all images without affecting the logo. Below is the code I have in my stylesheet but this puts a border on all images

a img {

border: 1px solid #CCCCCC;
}

Thanks

Re: No border on logo

Posted: Tue Jan 12, 2010 6:39 pm
by booyakan
not sure, but maybe u could go into the files where it actually calls that image and manually put border=0 specifically for just that picture?

Re: No border on logo

Posted: Tue Jan 12, 2010 10:02 pm
by Daniel
#content a img {

border: 1px solid #CCCCCC;
}

Re: No border on logo

Posted: Fri Jan 15, 2010 6:49 pm
by masha4
Daniel wrote:#content a img {

border: 1px solid #CCCCCC;
}
Thanks but after putting the code the logo has border changed to be thick like 2px- only the logo border but all the other imaged are fine.

Re: No border on logo

Posted: Mon Jan 18, 2010 8:07 am
by NewMethod
You could either modify the html inline and add style="border:none" to the image and use your method.. it's a bit hacky.

Or you could do it properly and set the image class attribute (if they haven't already got some way of identifying them, they probably have) and set the border for that in the stylesheet.

Re: No border on logo

Posted: Tue Jan 19, 2010 11:36 am
by CodeBits
Why not just add an a img style to the div2 class.

Code: Select all

#header .div2 {
	float: left;
	padding-top: 15px;
	padding-left: 15px;
}
#header .div2 a img {
	border: 0;
}
Or, add a style class to the logo image

Code: Select all

.logo a img {
	border: 0;
}
Then in the header.tpl add the class to the logo src

Code: Select all

<div class="div2"><a href="<?php echo $home; ?>"><img class="logo" src="<?php echo $logo; ?>" title="<?php echo $store; ?>" alt="<?php echo $store; ?>" /></a></div>
The rest of your images will still have a border.