Forums

[resolved] Setting Margin/Padding In Widgets (9 posts)

  1. AmandaNoelle82
    Member
    Posted 4 years ago #

    If you look at my blog, the text in the widgets is flush against the edge. I don't know what to change in the CSS to leave a little margin or padding (I can't figure out the difference!) Every time I play around with the code, something goes screwy. Here is the code for left widgets as it is now (right is the same except for "float"):

    #leftnav
    {
    font-size: 12px;
    float: left;
    width: 180px;
    margin: 10px;
    padding-top: 4px;
    margin-top: 0;
    margin-bottom: 20px;
    margin-right: 5px;
    text-align: left;
    }

    or it even may be this:

    #sidebarleft
    {
    margin-bottom: 10px;
    background: none;
    padding: 0 8px 0 8px;
    }

    What can I do to give it about a 10px buffer around the text?

  2. marjiec
    Member
    Posted 4 years ago #

    I suggest removing the div tag that surrounds the text. You should be able to do this with the plugins parameters, remove text align center.
    Now you should be able to style the plugin with padding but you will need to add some CSS in your stylesheet.
    Add this
    .wp_quotes_quote{
    padding: 6px;
    }
    This will pad your text.
    Hope it works, let me know.

  3. AmandaNoelle82
    Member
    Posted 4 years ago #

    Marjiec, I used the <div> tags as a quick fix, because it was honestly hard to read. It's not just the quotes widget; it's the "About Tip Diva," "Entrecard," "Subscribe," and "Categories" widgets.

    Is there one fix that will pad all of my widgets that aren't using unordered lists?

  4. marjiec
    Member
    Posted 4 years ago #

    They have the same situation, the div align center problem. That has to be taken away then you can use CSS and the div class that is in place to change the padding.
    In this case it is .textwidget.
    If this is not in your CSS page add it, this should take care of the padding.
    The last four widgets you mentioned are different than the diva one, use the code I sent first for that one.
    Remember to remove the div align center from your widgets first.

  5. AmandaNoelle82
    Member
    Posted 4 years ago #

    EDIT - Actually, quotes one didn't fix correctly

  6. marjiec
    Member
    Posted 4 years ago #

    Try using '#wp_quotes: padding: 6px;'
    There is also an id tag around the quote, this one should work.
    Your site never fully loads for me.

  7. AmandaNoelle82
    Member
    Posted 4 years ago #

    Where does it stop loading? No one else has complained, so I didn't know there was a problem.

  8. AmandaNoelle82
    Member
    Posted 4 years ago #

    The quotes worked, thank you so much!

    Guess I now have to work on the other problem :)

  9. marjiec
    Member
    Posted 4 years ago #

    I'm glad it is now working.
    Also your page loaded fine for me this time.

Topic Closed

This topic has been closed to new replies.

About this Topic