Click here to Skip to main content
11,804,574 members (75,850 online)
Rate this: bad
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

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 {
        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;
Posted 25-Feb-13 3:20am
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 OriginalGriff 3,205
1 Maciej Los 1,950
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,187

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2015
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