WordPress.org

Ready to get started?Download WordPress

Forums

Set a sidebar title's background (3 posts)

  1. rossrobbie
    Member
    Posted 4 years ago #

    I have set a background to every widget title in the sidebar and now it looks like that

    I want the background to appear on the right side of the title,
    first is the title and then the background appears, so the hole thing looks something like that

    So what kind of script or something I need to make the background (it's a color not an image) to appear next to the title, not on its back.
    Is it PHP or JavaScript? Or it's just CSS?

  2. chinmoy
    Member
    Posted 4 years ago #

    modify your css.
    <div >
    <div id="title">
    Category
    </div>
    <div id="bg">
    Category
    </div>
    </div>

    #title{
    float: left;
    }

    #bg{
    float: right
    background: ul(image)
    }

    Code should be link above.

  3. rossrobbie
    Member
    Posted 4 years ago #

    That won't help.
    This category title is the widget.
    I need to set a background color to each widget title in the sidebar
    and position it depending on the title width.

    #sidebar h2, .widget h2{
    	background:#F00;
    	font-family:"Trebuchet MS";
    	font-size: 13pt;
    	font-style: normal;
    	font-weight: bold;
    	letter-spacing: normal;
    	letter-spacing:0px;
    	cursor:default;
    	margin:0 0 5px 0;
    }

    That code manages the widget titles.

Topic Closed

This topic has been closed to new replies.

About this Topic