WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how to change the width of a fixed width theme ? (3 posts)

  1. aman_devy
    Member
    Posted 1 year ago #

    hi folks
    I'm using monospace theme having fixed page width property.
    I want to change the page width, post content width and sidebar width according to my requirements.
    what changes to CSS should I make to accomplish this.
    my website is http://www.kodevelop.com

    thanks in advance ! :)

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    in header.php of your theme:

    <?php if (!isset($content_width)) $content_width = 560; ?>
    
    	<div id="wrap" style="width:<?php echo $content_width + 290; ?>px">
    
    		<div id="container" style="width:<?php echo $content_width; ?>px">

    change 560 (content) and 290 (sidebar) to what sizes you need;

    also in style.css:

    #sidebar { overflow:hidden; clear:left; text-align:right; width:250px; height:auto; padding:0px 15px 0px 0px; border-right:1px dotted #C8C8C8; }

    change the 250px accordingly - needs to be 40px smaller than what you use instead of the 290 in header.php

    (untested)

  3. aman_devy
    Member
    Posted 1 year ago #

    thanks a lot !
    its working :)

Topic Closed

This topic has been closed to new replies.

About this Topic