Viewing 8 replies - 1 through 8 (of 8 total)
  • then you need to assign a class to product images aka

    <img src="myimage" class="product" ... />

    and then apply the changes in your CSS to only images using that class.

    Currently, you are applying it to all images:

    img
    {
    	background:url(img/shadow.gif) no-repeat right bottom;
    	padding:4px 10px 10px 4px;
    	border:0;
    	border-top:#eee 1px solid;
    	border-left:#eee 1px solid;
    }

    Once youve added the class=”product” to your image tags, then you just do this:

    img.product
    {
    	background:url(img/shadow.gif) no-repeat right bottom;
    	padding:4px 10px 10px 4px;
    	border:0;
    	border-top:#eee 1px solid;
    	border-left:#eee 1px solid;
    }

    Lots and lots of Wonderful CSS tutorials can be found here:

    https://www.w3schools.com/css/default.asp

    Thread Starter matte2k

    (@matte2k)

    ok.. i will try that.
    must i add “class=”product” manually every time i want to put an image in a thread?

    /mathias

    thats not within the scope of your original question ?? — but since you asked, No, you dont, if you edit your quicktags or tweek your wysiwyg editor, or add that little piece of code to the inline uploader (if you happen to be using that).

    As you see, there a few ways to do that — take your pick.

    Thread Starter matte2k

    (@matte2k)

    but how do i do that?

    i use the built in upload system, when uploading images to an post.
    but also when uploading other images, like logo, small gif pics etc.

    i usually not use the wysiwyg editor to add images to my post.

    help me please.

    Thread Starter matte2k

    (@matte2k)

    can’t i add lines like <div “class=”product”> or something in the single post files?

    If you want borders around images in all posts (though I’m not sure if you mean that by “product images”), and your posts are in <div class="post">, you could add the following to your css:

    .post img
    {
    	background:url(img/shadow.gif) no-repeat right bottom;
    	padding:4px 10px 10px 4px;
    	border-top:#eee 1px solid;
    	border-left:#eee 1px solid;
    }

    … and remove the border from the lonely "img".

    Thread Starter matte2k

    (@matte2k)

    thanks.. and if i want to imply it in this one:

    <div class=”entry”>
    <?php the_content(); ?>
    <?php wp_link_pages(); ?>
    </div>

    so i can have images as titles..

    Thread Starter matte2k

    (@matte2k)

    Thanks Sivar!!

    I created these lines:

    #content .entry img
    {
    background:url(img/shadow.gif) no-repeat right bottom;
    padding:4px 10px 10px 4px;
    border-top:#eee 1px solid;
    border-left:#eee 1px solid;
    }

    works fine. i think.
    look https://www.seriegrossisten.se

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘No border around the images, how?’ is closed to new replies.