Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: CSS HTML
I am using thumbnail view in html. with i want to reduce sapcing between two thumbnail..like
 
m giving it in CSS..with following code...I just want to reduce gap between two
    tag..plz help me out...
    <style type="text/css">
    body {
        font: Arial, Helvetica, sans-serif normal 10px;
        margin: 0; padding: 0;
    }
    * {margin: 0; padding: 0;}
    img {border: none;}
    .container {
    padding:0px;
        height: 360px;
        width: 910px;
        margin: -250px 0 0 -450px;
        top: 50%; left: 50%;
        position: absolute;
    }
    ul.thumb {
        float: left;
        list-style: none;
        margin: 0; padding: 10px;
        width: 360px;
    }
    ul.thumb li {
        margin: 0; padding: 5px;
        float: left;
        position: relative;
        width: 110px;
        height: 110px;
    }
    ul.thumb li img {
        width: 100px; height: 100px;
        border: 1px solid #ddd;
        padding: 5px;
     
        position: absolute;
        left: 0; top: 0;
        -ms-interpolation-mode: bicubic;
    }
    ul.thumb li img.hover {
        background:url(thumb_bg.png) no-repeat center center;
        border: none;
    }
    #main_view {
        float: left;
        padding: 9px;
        margin-left: -10px;
    }
    </style>
Posted 25-Feb-13 3:20am
Comments
richcb at 25-Feb-13 10:44am
   
Have you tried setting the padding to 0 too?
Bhaskar Dhone at 26-Feb-13 3:43am
   
yeah i tried with padding to zero . but its not working too
vbmike at 25-Feb-13 14:17pm
   
The padding settings you have in the code above apply to ALL four sides of an element...maybe you need to adjust them on the sides you need it to be different??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 450
1 OriginalGriff 403
2 Sergey Alexandrovich Kryukov 219
3 Peter Leow 190
4 CPallini 189
0 OriginalGriff 6,092
1 Sergey Alexandrovich Kryukov 5,022
2 Maciej Los 3,269
3 Peter Leow 3,164
4 DamithSL 2,490


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100