• Hi,

    I’m currently using a theme that adds a small border to every image on my post, thats great and all but I wanted to exclude some images from using the border (specially my WP Ratings image), the stylesheet has:

    /* Images */
    .single img, img.thumbnail, .flickr img, img.feature-image, #post-thumbnail-tabs img, #post-sections img, #home img, .post img {
    	padding: 3px;
    	background: #222;
    	border: 1px solid #333;
    	}

    under that I added .no-border img { border: none; } and then inserted <span class=”no-border”>[ratings]</span> into the post but it doesn’t seem to have any effect, does anyone know how I could get this to work?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Just .no-border, no img after. Also, you will want to place class="no-border" in the img tag, not in the span tag.

    Thread Starter Soprano

    (@soprano)

    but I have no access to the image tag of the plugin because I can only see the [ratings] shortcut.

    it might help if you can show us your website (and maybe we can find something in the source code?)

    Try using div instead of span? <div class=”no-border”>

    Thread Starter Soprano

    (@soprano)

    oh, well i would but its not my blog and he has set it to private so you cant really see it, I’m using the Options theme from https://justintadlock.com/archives/2008/02/24/options-wordpress-theme I read someone had similar probs in the forums but there was no good solution.I tried the Div tag with no success, also the <p class…

    /************************************************
    	Images
    ************************************************/
    /* Images */
    .single img, img.thumbnail, .flickr img, img.feature-image, #post-thumbnail-tabs img, #post-sections img, #home img, .post img {
    	padding: 3px;
    	background: #222;
    	border: 1px solid #333;
    	}
    .no-border img { border: none; }
    .post .avatar { float: left; width: 40px; height: 40px; margin-right: 10px; }
    .archive .post .avatar { width: 80px; height: 80px; }
    a img { border: none; }
    /* Post images */
    img {
    	max-width: 98.5%;
    	}
    /* Feature images */
    img.feature-image {
    	max-width: 300px;
    	margin: 0 10px 0 0;
    	}
    /* Thumbnail images */
    img.thumbnail, .recent img.thumbnail {
    	float: left;
    	width: 100px;
    	height: 100px;
    	margin: 0 10px 5px 0;
    	}
    /* Thumbnail Large images */
    img.thumbnail-large {
    	max-width: 265px;
    	float: left;
    	margin: 0 10px 5px 0;
    	}
    img.feature-full { max-width: 100%; }
    #post-blocks img.thumbnail-large, #post-blocks a img.thumbnail-large { border: none; }
    #post-thumbnail-tabs img { float: right; margin: 0 0 5px 10px; }
    #author-box img { float: left; margin-right: 10px; }

    thats the whole image css section on the stylesheet which is causing the probs, Im also having the same problem with the WP-Email (lesterchan.net/portfolio/programming.php) plugin email icon which is inserted into the single.php section using email_link(); }, I tried wraping that with the <span class but just got an error in the single page.

    I was wondering if anyone ever posted anything about my themes here. This would be the reason I set up forums on my site:
    https://justintadlock.com/forums

    Haochi, thank you—your advice helped me when I Googled this topic.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘remove css border from images’ is closed to new replies.