Ready to get started?Download WordPress


Help with widgetizing theme - functions.php (7 posts)

  1. jgclifton
    Posted 4 years ago #

    Hi There,

    I have a problem with widgetizing my theme using the functions.php file.

    My HTML is as follows:

    <div class="rightbar">
        <div class="righttitle">Best of the best</div>
        <br clear="all" />
        <div class="rightcontent">more test test test test test test test lol ionoun uwdjd wurhfn eurfie fieowjfe </div>

    The CSS for this is:

    .rightbar {
        text-align: left;
        width: 315px;
        margin: 0 auto;
    	border-left: 1px;
    	float: right;
    	height: auto;
    	min-height: 99%;
    .righttitle {
        text-align: left;
        width: 307px;
    	height: 35px;
        margin: 0 auto;
    	border-left: 1px;
    	float: left;
    	padding-top: 20px;
    	padding-left: 20px;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 18px;
    .rightcontent {
    	border-left: 1px solid #999;
    	border-bottom: 1px solid #999;
    	margin-left: 10px;
    	padding-left: 5px;

    The problem is the title is wider than the content, so when I code the functions.php the main content is stretched to the width of the title.

    I have coded my functions.php in many different ways and ran in to the same problem.

    Any help is really appreciated as this has been annoying me for a good few hours!

  2. jgclifton
    Posted 4 years ago #

    I know its not been long but any help would be really appreciated, this has been bothering me for ages!

  3. jgclifton
    Posted 4 years ago #

    Anyone? :(

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of specific help.

    And please don't bump posts.

  5. jgclifton
    Posted 4 years ago #

    I think ive provided everything there for someone to look?

    The problem is where the different div codes go, before and after title seems to interpret the code a bit weirdly and this stretches everything to its size.

  6. atkid
    Posted 4 years ago #

    It is better to provide a demo that shows the problem (or at least the full code of the HTML file)

    I usually use a spacer div to clear the float.

    div class="spacer"

    add these to your stylesheet:

    .spacer {clear:both}

  7. atkid
    Posted 4 years ago #


    It's not div class="spacer"

    The correct one :

    <div class="spacer"></div>
    .spacer {clear:both;}

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.