Click here to Skip to main content
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 4: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 Maciej Los 580
1 OriginalGriff 420
2 Sascha Lefévre 289
3 Abhinav S 220
4 CHill60 200
0 Sergey Alexandrovich Kryukov 9,773
1 OriginalGriff 9,290
2 Peter Leow 5,137
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,036

Advertise | Privacy | Mobile
Web03 | 2.8.150327.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