WordPress.org

Ready to get started?Download WordPress

Forums

How to reduce the widget spacing in sidebar (19 posts)

  1. SCO7TY
    Member
    Posted 2 years ago #

    Basically i would like to know how to reduce the gap between widgets in the side bar.

    I have messed around with the CSS file but had no look so far.

    website - http://www.completemuscleandfitness.com

  2. rikardo85
    Member
    Posted 2 years ago #

    Hey,

    Locate the following code in your .ccs file
    #sidebar .block
    margin 13px 0 52px

    You will want to reduce the 52px.

    Hope this helps

  3. SCO7TY
    Member
    Posted 2 years ago #

    I'll give it a go now, thanks

  4. SCO7TY
    Member
    Posted 2 years ago #

    spot on!! Thanks very much :D

  5. rikardo85
    Member
    Posted 2 years ago #

    No worries

  6. SCO7TY
    Member
    Posted 2 years ago #

    I have one more question, if you go on my site i have managed to reduce the space and have deleted the titles. But i still have a gap at the top of the sidebar. Do you have any idea how i can get rid of that?

  7. carbretta
    Member
    Posted 2 years ago #

    it looks like there's a blank widget there. On checking the code you have some loose bits that are un-needed.
    There is a part - <h2></h2> that you can get rid off. This should solve your problem

  8. SCO7TY
    Member
    Posted 2 years ago #

    Thanks for looking for me but i have no idea what i'm looking for to delete lol.

    Can you try and point out where the <h2></h2> is i can get rid of?

    Thanks.

    EDIT: just used firebug and i can see what you mean by blank widget and the <h2> </h2> but as mentioned i'm not sure where to find it to delte it

  9. SCO7TY
    Member
    Posted 2 years ago #

    It's not in stylesheet is it?

  10. carbretta
    Member
    Posted 2 years ago #

    When you page is open if you right click on the area and view code you will see it. As the where it is on the wordpress code it would be wherever the code for the sidebar is. So either in the css file in the location that rikardo85 mentioned above or in the sidebar.php file.

  11. SCO7TY
    Member
    Posted 2 years ago #

    I cant find it anywhere, its driving me crazy!

  12. esmi
    Forum Moderator
    Posted 2 years ago #

    Try using Firefox with the Firebug add-on for this kind of CSS work.
    http://getfirebug.com/

  13. SCO7TY
    Member
    Posted 2 years ago #

    I have used it, i used firebug to find the problem. I just dont know where to edit it now that i have found it.

  14. esmi
    Forum Moderator
    Posted 2 years ago #

    You need to edit that entry in your theme's stylesheet.

  15. SCO7TY
    Member
    Posted 2 years ago #

    Thats the problem, its not there! Very strange.

  16. alchymyth
    Forum Moderator
    Posted 2 years ago #

    its not there

    if something is not in style.css, simply add it new.

    Using Firebug should have shown you that the space is an empty title of the search widget

    - check if the title of that widget is really empty - not just a space character or so;

    or add:
    .widget_search h2 { display: none; }
    to style.css

    keep practicing with Firebug ...

  17. SCO7TY
    Member
    Posted 2 years ago #

    Where do i add .widget_search h2 { display: none; }

    Sorry i'm very new to all of this and im struggling to understand most of that last reply.

    I appreciate the help tho!

  18. alchymyth
    Forum Moderator
    Posted 2 years ago #

    or add:
    .widget_search h2 { display: none; }
    to style.css

    what is difficult to understand in this section?

    knowledge of css is a pre-requisit to customising any kind of web application - not just WordPress.

    this WordPress forum is not the place to teach fundamental formatting.

    http://www.w3schools.com/css/

  19. carbretta
    Member
    Posted 2 years ago #

    Have a play around. Have a look through the style.css file and work out what is what. Then add the code mentioned by alchymyth above. Where you put it in the code will depend on where it appears on the page. Any more questions don't hesitate to ask, that's what we are here for :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.