WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Getting rid of Image Borders (5 posts)

  1. chocolateshavings
    Member
    Posted 6 years ago #

    Hi everyone

    I've been trying to get rid of the default borders around images. I've tracked down the 'entry content img' tag in the css file and changed it to :

    .entry-content img {
    	margin: 0 5px;
    	padding: 4px;
    	border: none;
    	max-width: 100%;
    	}

    And nothing works! The weirdest part is, when I do the same thing on 'dry' local version of my site, it works! Help!?

    (the site is: http://www.chocolateshavings.ca)

    Thanks!

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    You're using the K2 theme. It has more than one stylesheet...

    <link rel="stylesheet" type="text/css" media="screen" href="http://chocolateshavings.ca/wp-content/themes/K2 v096/style.css" />
    ...
    <link rel="stylesheet" type="text/css" media="screen" href="http://chocolateshavings.ca/wp-content/themes/K2 v096/styles/oliver/style.css" />

    If you look at /wp-content/themes/K2 v096/styles/oliver/style.css , you'll find this:

    .entry-content img {
    	margin: 0 5px;
    	padding: 4px;
    	border: 1px solid #ccc;
    	max-width: 100%;
    	}

    There's your other "solid".

  3. Null
    Member
    Posted 6 years ago #

    Try:
    border: 0px

  4. chocolateshavings
    Member
    Posted 6 years ago #

    AHH! That makes *perfect* sense! And the reason it worked on my local version was because I edit my local version directly using the 'oliver/style' css! Thank you so much!

  5. naomikyarorin
    Member
    Posted 6 years ago #

    What if i want to have some image with border and some image without border?

Topic Closed

This topic has been closed to new replies.

About this Topic