Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] Post image without border (more of a general html query) (http://forum.bytesforall.com/showthread.php?t=17004)

totalwise Mar 12, 2012 01:57 PM

[SOLVED] Post image without border (more of a general html query)
 
I use a lot of images in my posts, small 150px wide images as visual aids for paragraphs.

I don't like the default border around the images and prefer borderless images.

I use this code to implement it.

HTML Code:

.nodecimage {border: medium none; padding: 0px; background-color: transparent}
If I use this as a id (#nodecimage) and call it LIKE THIS <img src="..." id="nodecimage">

it works fine, however id should really be used for single instances. What I'm having trouble with is that I can use class="nodecimage" inside the <img> tag. I have to surrounded the <img> around a span and use

HTML Code:

head:
.nodecimage {border: medium none; padding: 0px; background-color: transparent}

body:
<span class="nodecimage"><img src="..."></span>

Is this an html issue, or is there a conflict inside athlatpua (sic) which is forcing me to use span?

juggledad Mar 12, 2012 02:26 PM

What is the url? It is possible that htere is some other CSS that is more specific and it being given precedence.

You could try using
HTML Code:

img.nodecimage {border: medium none; padding: 0px; background-color: transparent}
and if that doesn't work, add '!important' or
HTML Code:

img.nodecimage {border: medium none; padding: 0px; background-color: transparent !important;}

totalwise Mar 12, 2012 07:46 PM

Thanks juggledad. the img.nodecimage no works perfectly well with <img src="..." class="nodecimage">

I would have though .nodecimage would have worked perfectly well on it's own. I think I've spent more time splitter hairs over these minor css rules more than anything.

This is good, because when I manually inserted full css rules in

<img src="..." style="border: none; padding: 2px; background-color: transparent">

Wordpress would keep on breaking the css when I went into visual editor, so the stylesheet way was pretty important.

P.s. I didn't use the !important attribute at all. No need for it.


All times are GMT -6. The time now is 02:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.