Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Why don’t you create a new file CSS and separate the style of code?

    The structure of the site is messy.

    <div id="wrap">
    <div id="header">
     your code here..
    </div>
    
    <div id="container">
    
    <div id="content">
     your code here..
    </div><!-- end content -->
    
    <div id="sidebar">
     your code here..
    </div><!-- end sidebar-->
    
    </div> <!-- end container -->
    
    <div class="clear"></div>
    
    <div id="footer">
    your footer code...
    </div><!--end footer-->
    </div><!-- end wrap -->

    and create a style.css

    #wrap{
       width:1024px;
       margin:auto;
       }
    #header{
       .....
       }
    
    #content{
       padding:20px;
       ....
    }
    
    .clear{
       clear:both;
       }
    
    #footer{
     ....
    }

    If you do a good structure of your site, its easier to find any mistake.

    Thread Starter nickallain

    (@nickallain)

    Thanks WillxD,

    I’ve actually been doing that as I go along. I initially created a prototype with all this messy code. I’ve cleaned up the rest of the pages – this is the last one to fix up.

    I’m just weary of separating this all out then having to bounce between two files to find the issue.

    I agree that the mess is part of the problem.

    have you checked, if this
    $pageid = $id;
    in line 5 actually contains anything?

    imho, this is unlikely;
    i would use something like:
    $pageid = $post->ID;

    For my 2 cents that looks like uncleared floats. if u float one or more elements in a div you need to do something to bring the container down behind the floats otherwise subsequent content rides up. These days we add width : xxx; overflow:hidden; to the parent. But mixing yr html and CSS inline is a disaster.

    Thread Starter nickallain

    (@nickallain)

    Thanks everyone,
    Turns out I was using absolute positioning on the page contents (maincontent) where I should have been using relative. Turns out all I needed was fresh eyes and some good pointers. ?? This issue is officially resolved.

    alchymyth, strangely enough they both seem to work.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Div not expanding’ is closed to new replies.