HELP: How to remove space css

Discussion in 'CSS' started by irule272, Feb 25, 2009.

  1. #1
    Hello I'm just starting to learn css and I'm having a hard time removing the space between the elements.

    Here's the picture.

    [​IMG]

    Here's the code

    #sidebar-wrapper {
    float: right;
    width: 320px;
    margin: 0;
    padding: 0 0 10px;
    display: inline;
    }
    #midsidebar-wrapper {
    width: 320px;
    float: right;
    overflow: hidden;
    }
    #lsidebar {
    background: #FFF url() top no-repeat;
    float: left;
    width: 150px;
    margin: 0;
    padding: 10px 10px 0;
    border: 1px solid #DDD;
    display: inline;
    }
    #rsidebar {
    background: #FFF url() top no-repeat;
    float: right;
    width: 120px;
    margin: 0;
    padding: 10px 10px 0;
    border: 1px solid #DDD;
    display: inline;
    }




    Can someone help me how to remove that space.. Thanks.
     
    irule272, Feb 25, 2009 IP
  2. fex

    fex Peon

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Html code ?


    #midsidebar-wrapper{ position: relative; top: -10px; }
    #lsidebar{ position: relative; top: -10px; }
    #rsidebar{ position: relative; top: -10px; }
     
    fex, Feb 25, 2009 IP
  3. irule272

    irule272 Well-Known Member

    Messages:
    1,153
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    155
    #3
    Thanks fex!

    I tried your code but the spaces are still there...

    Here's what I did.


    #sidebar-wrapper {
    float: right;
    width: 320px;
    margin: 0;
    padding: 0 0 10px;
    display: inline;
    position: relative; top: -10px;
    }
    #midsidebar-wrapper {
    width: 320px;
    float: right;
    overflow: hidden;
    position: relative; top: -10px;
    }
    #lsidebar {
    background: #FFF url() top no-repeat;
    float: left;
    width: 150px;
    margin: 0;
    padding: 10px 10px 0;
    border: 1px solid #DDD;
    display: inline;
    position: relative; top: -10px;
    }
    #rsidebar {
    background: #FFF url() top no-repeat;
    float: right;
    width: 120px;
    margin: 0;
    padding: 10px 10px 0;
    border: 1px solid #DDD;
    display: inline;
    position: relative; top: -10px;
    }




    It didn't work. What do you think is the problem?
    Anyone?
     
    irule272, Feb 25, 2009 IP
  4. fex

    fex Peon

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Post the piece of html code,, it would help..
     
    fex, Feb 25, 2009 IP
  5. XandroZ

    XandroZ Peon

    Messages:
    395
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    a link to a test page online will be helpful
     
    XandroZ, Feb 25, 2009 IP
  6. z80039

    z80039 Well-Known Member

    Messages:
    517
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Try removing the margins, or put a minus value to them.
    As said putting the html code or a smaple site may help more.

    Regards
     
    z80039, Feb 25, 2009 IP
  7. irule272

    irule272 Well-Known Member

    Messages:
    1,153
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    155
    #7
    irule272, Feb 25, 2009 IP
  8. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #8
    In your margin you have 0 0 10px and there's the 10px
     
    drhowarddrfine, Feb 25, 2009 IP
  9. irule272

    irule272 Well-Known Member

    Messages:
    1,153
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    155
    #9
    Sorry I didn't get. I do not know anything about css I'm just starting to learn it.

    Can you tell me exactly what I need to change/remove?

    thanks!
     
    irule272, Feb 25, 2009 IP
  10. fex

    fex Peon

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Change 10px into 0px
     
    fex, Feb 25, 2009 IP
  11. irule272

    irule272 Well-Known Member

    Messages:
    1,153
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    155
    #11
    I check the margin and it's 0;

    or do I need to put it like this --> margin: 0 0 0px;

    and where exactly in the #sidebar-wrapper?

    I'm confuse. Sorry for my ignorance :confused:
     
    irule272, Feb 25, 2009 IP
  12. irule272

    irule272 Well-Known Member

    Messages:
    1,153
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    155
    #12
    anyone? :(
     
    irule272, Feb 25, 2009 IP
  13. dickieknee

    dickieknee Active Member

    Messages:
    441
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #13
    in padding and margins if you use the four element then you need to understand what
    each is impacting the 0 0 0 10px incorectly identified th 10px as a y element

    infact the last element 10px impacts the x position
    the first element impacts the y position

    i woud suggest to useing just 2, the x and y positions

    check all the id's and classes used in the sidebar,
    many wordpress themes are badly coded wrt css

    this is something you need to nut out... as it will take too long to check ur source code and go thru the stylesheet
     
    dickieknee, Feb 25, 2009 IP
  14. z80039

    z80039 Well-Known Member

    Messages:
    517
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    130
    #14
    The style code you posted is not complete, I have not done any wordpress coding before but the divs you are pointing to are widgets.
    You need to know the exact class or div to be able to figure it out, therefore I say you download firebug for firefox (if you haven`t) and see what part of the Css stylesheet must be changed. I looked once into the site code before you change the theme and I saw a margin of 0 0 10px as I remember , this is what you are lookig to make 0.

    One more time firebug and test it.

    Regards
     
    z80039, Feb 28, 2009 IP