Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    24
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Spacing between images using css

    Dear all,

    I wanted to keep vspace=30px and hspace=20px between the images. Instead of using the deprecated vspace and hspace tags in html, I have added a line (shown in red) in the css stylesheet:

    .ImgBorder:hover { border: 1px solid red;
    margin: 30px 20px; }


    But, the result is that only the horizontal spacing (20px) is shown between the images, the vertical spacing (30px) isn't shown between the images. What's wrong with my css coding?

    The resulting page is here: http://www.lixiao-art.com/bliss.html

    The entire css coding is here:

    ------------

    body { font-family: Verdana;
    color: white;
    margin: 0px;
    background-color: black; }
    #header { font-family: courier new;
    padding-left: 40px;
    padding-top: 5px;
    padding-bottom: 5px;
    border: none;
    background-color: white;
    margin-bottom: 0px; }
    #content {float: left;
    padding: 30px 20px 20px 100px;
    width: 650px;
    margin: 0px;
    border: none;
    font: white;
    font-family: Arial;
    background-color: black; }
    h2 {height: 2em;}
    #nav {float: left;
    text-align: right;
    font-size: small;
    width: 200px;
    margin-top: 30px;
    font-weight: bold;
    padding: 10px;
    border: none;
    }
    #footer { font-family: arial;
    padding-bottom: 5px;
    width: 100%
    border: none;
    background-color: black;
    color: white;
    margin-bottom: 0px; }
    a{text-decoration: none;
    color: white;}
    a:hover {color: red;}



    * {margin: 0;}
    html, body {height: 100%;}

    .wrapper {min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -1.5em;}

    .footer, .push { height: 1.5em; }

    .ImgBorder:hover { border: 1px solid red;
    margin: 30px 20px; }

    img { border: none; }

    ---------------------------

    Many thanks !!

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    See my reply to your other thread...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •