WordPress.org

Ready to get started?Download WordPress

Forums

Tag cloud displays in single line (8 posts)

  1. setnaps
    Member
    Posted 3 years ago #

    Hi.
    I have a problem with my tags display.
    I have added the tag cloud widget to my sidebar.
    I have 2 options, list or flat.
    If I chose Flat, my list of tags appears in a long single line that goes beyond the screen.
    I would like the text to be justified in my sidebar, so, when it reaches the edge the sidebar my tags list go to a second line, like a paragrah.

    Is there any way to achieve so?
    Thank you very much

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    no other options?
    such as selecting a separator between the tags?

    is this the default tag cloud widget that comes with the installation?

    if there are no options to add a separator space, try to add some code like this to functions.php of your theme:

    add_filter('widget_tag_cloud_args','set_separator_for_tags');
    function set_separator_for_tags($args) {
    $args = array('separator'    => ' ');
    return $args;
    }
  3. setnaps
    Member
    Posted 3 years ago #

    Thanks for your answer...
    Nothing happened.

    Here's the link to my blog so you can see what happens

    http://www.victorenrich.com

    in the layout.css of my theme I've tried this but didn't happen anything at all neiter

    /*---:[ sidebar styles ]:---*/
    .sidebar { }
    #column_wrap .sidebar ul.sidebar_list { padding-top: 0em; }
    	li.widget { font-size: 1.2em; line-height: 1.5em; margin-bottom: .3em; text-align:justify;}
    	li.tag_cloud { line-height: 18px; text-align:justify;}
    		li.widget p { margin-bottom: 1.5em; line-height: 18px; text-align:justify; }
    		li.widget abbr, li.widget acronym { font-size: 0.917em; }
    		li.widget code { font-size: 1em; }
    			li.widget ul li { margin-bottom: 0.667em; }
    				li.widget li ul { margin: 0.667em 0 0 1.5em; }

  4. setnaps
    Member
    Posted 3 years ago #

  5. Paul
    Member
    Posted 3 years ago #

    Can you try adding the style below to your custom.css file

    .custom #sidebar_1 {
    position: static;
    }
  6. setnaps
    Member
    Posted 3 years ago #

    WOW!!!!!
    It worked out...
    Thank you thank you thank you.
    have a look.

    http://www.victorenrich.com

  7. setnaps
    Member
    Posted 3 years ago #

    I have found something interesting that may be the origin of the conflict..
    Maybe some of you can help.

    I had configured my sidebar to
    .custom #sidebar_1 {position: fixed;}

    Which means that stays fixed as I scroll down.
    By this, the text don't justify.

    When I add .custom #sidebar_1 {position: static;}
    my text justifies but my sidebar is not fixed anymore.

    Now...the big question

    Can I have sidebar in fixed and static???

    Which code should I use to activate both?

    Thanks a lot again

  8. Paul
    Member
    Posted 3 years ago #

    Yes, but no need to do that just change the style to...

    .custom #sidebar_1 {
        width: 250px;
    }

    ...or adjust the width to whatever you like.
    This limits the width of your sidebar_1 so it will not go out of screen and make your tag cloud just in one line.

Topic Closed

This topic has been closed to new replies.

About this Topic