overriding CSS Image padding/margin/spacing in a table

GK User
Thu Jan 06, 2011 12:15 am
I was wondering if someone could let me know how to override the CSS rules in "Sporter" when I insert an image in a table.

Everytime I add an image in one of the cells it automatically puts space above and below it. I have tried


I tried adding the following in the override.css and using: <img class="cb-border" src.....

img.cb-border {
border: 0px;
padding: 0px;
margin: 0px;
spacing: 0px;
}


but no luck.

Thanks!
User avatar
Fresh Boarder

GK User
Thu Jan 06, 2011 1:06 am
Try:

img.cb-border {
border: 0px!important;
padding: 0px!important;
margin: 0px!important;
spacing: 0px!important;
}

OR put this suffix in the module which is the best thing to do.

.no_pad img.cb-border {
border: 0px!important;
padding: 0px!important;
margin: 0px!important;
spacing: 0px!important;
}
you can put this bit of css in the addons.css file, or any css file for that matter as they will get loaded before the page displays in the browser. Best to use addons.css to keep your customs organized.

and in the module use (space)nopad

But from looking at your example css your class is really cb-border it looks like you where fishing for the tag when it should be.



.no_pad .cb-border {
border: 0px!important;
padding: 0px!important;
margin: 0px!important;
spacing: 0px!important;
}
User avatar
Platinum Boarder

GK User
Thu Jan 06, 2011 2:49 am
Thanks for the reply.

The table I have added is in an article... not a module so I can't add a suffix.

I just realized it is working fine in Firefox, it's just IE8 where it is adding space above and below the images in the cells.
User avatar
Fresh Boarder

teitbite
Fri Jan 07, 2011 12:20 am
Hi

You can try this code:

Code: Select all
td image {
margin:0px;
padding:0px;
}


But I think the space can be from something else. Please show me Your site with this image inside the table.
User avatar
Moderator


cron