WordPress.org

Ready to get started?Download WordPress

Forums

adding space between image and text in style.css (2 posts)

  1. wpfotokel
    Member
    Posted 2 years ago #

    I'm trying to find the correct coding to add to my style.css so that there is a 10px padding or margin around all sides of the image.
    Can anyone please help. Also where in the coding should I place it.

    Heres the first part of my style.css

    [please mark any code according to the forum guidelines for posting code - or even better post a link to your site]

    /*
    Theme Name: This Just In!
    Theme URI: http://wphackr.com/themes/this-just-in/
    Description: Compatable with WordPress version 2.7 and higher. A clean, optimized with enhanced archives and a large header image, designed for professional and/or photography blogs. This version adds support for threaded comments and sticky posts.
    Version: 3.4
    Author: John Crenshaw
    Author URI: http://wphackr.com
    Tags: black, white, fixed-width, two-columns, threaded-comments, sticky-post, right-sidebar
    
    	This Just In!
    	 http://wphackr.com/
    
    	This theme was designed and built by John Crenshaw at WordPress Hacker.
    	For tips on customizing WordPress, visit http://wphackr.com
    
    	The CSS, XHTML and design is released under GPL:
    	http://www.opensource.org/licenses/gpl-license.php
    
    */
    body {
    	font-size: 62.5%; /*Set font size so 1em = 10px*/
    	background: #333;
    	color: #333;
    	margin: 20px 0;
    	text-align: center; /*Center site on page in IE*/
    	font-family: verdana, arial, tahoma, serif;
    }
    div img { padding: 10px 10px;
    margin: 10px 10px;
    border: 10px 10px;
    }
    
    a,
    a.link,
    a.visited {
    	color: #446592;
    	text-decoration: underline;
    }
    a:hover,
    a:active {
    	color: #6699CC;
    	}
    a:hover img,
    a:active img,
    a img:hover,
    a img:active,
    a.img:hover,
    a.img:active {
    	background: transparent;
    	}
    
    h1 a.standard {
    	color: #446592 !important;
    	background: transparent !important;
    	text-decoration: none;
    	font-weight: bold;
    	}
    h1 a.standard:hover {
    	color: #446592 !important;
    	background: transparent !important;
    	text-decoration: none;
    }
    h1 a, h2 a {
    	text-decoration: none;
    	color: #000;
    }
    h1 a:hover, h2 a:hover {
    	color: #446592;
    }
    h1.pagetitle { /* For title of categories, archives, and tags pages */
    	border-bottom: 1px dotted #CCC;
    	margin-bottom: 15px;
    	display: inline;
    	font-style: italic;
    }
    h3.pagetitle { /* For ...now browsing by "" for categories, archives, and tags pages */
    	display: inline;
    	color: #990000;
    	font-style: italic;
    }
    h3.archives {
    	margin-top: 10px;
    	margin-bottom: 10px;
    }
    h3.archive_head {
    	font-size: 1.8em;
    	color: #000;
    }
    h3.archives a {
    	text-decoration: none;
    }
    h3.archives a.permalink {
    	border-bottom: 1px dotted #CCC;
    }
  2. zex2911
    Member
    Posted 2 years ago #

    Change this line

    div img { padding: 10px 10px;

    with this

    img { margin: 10px;

    Also, link to your site is always welcome. :)

Topic Closed

This topic has been closed to new replies.

About this Topic