...

View Full Version : fixed content in every page vs page specific content



ketanco
11-03-2009, 01:29 PM
Hello,
The code below is the main wrapper div and its contents that I am planning to use in every page.

I have three questions:
1-Before I was using absolute positioning to position everything. Since I learned that is wrong, I switched to this route. How does this look in general as this is my first time using divs like this, am I missing something major?

2-Everything in these divs will go to every page, as they contain the logo, menus, google ads etc..., except where it says "page specific content goes here. Only that div is to include page specific content. Therefore it will be varying height. So I want its height to adjust automatically . I said height:auto, and it first seemed to work fine, when i added text only. BUT when I added a file called top_list.html as seen below, the height of the div did not adjust automatically for that top_list file display height. How can I solve that? Should I put specific div heights in that section, at each case?

3-As I said before, everything here goes to every page except page specific content. So I dont want to paste this entire thing to every page. But if I write this in a single file called say, all-fixed-items, and then use php include to include it in every page, then how can I insert the page specific content into that div that contains page specifc items?


<div style="background-color: #ffffff; border:1px solid red; width: 940px; height: auto; float:left;">

<div style="background-color: #ffffff; border:1px solid green; width: 470px; height: 68px; float:left; margin-top:-4px; ">
<?php
include("logo.php");
?>
</div>

<div style="background-color: #ffffff; border:1px solid blue; width: 460px; height: 64px; float:left;">
<?php
include("googleads_top.php");
?>
</div>

<div style="background-color: #ffffff; border:1px solid yellow; width: 940px; height: 70px; float:left;">
<?php
include("menu_top.php");
?>
</div>


<div style="background-color: #ffffff; border:1px solid black; width: 175px; height: 900px; float:left;">
<?php
include("menu_side.php");
?>
<?php
include("googleads_left.php");
?>
</div>

<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////-->
<!-- ////////////////////////////////////////////////////////PAGE SPECIFIC CONTENT GOES HERE////////////////////////////-->
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////-->
<div style="background-color: #ffffff; border:1px solid black; width: 760px; height: auto; float:left;">
MAIN CONTENT GOES HERE. MAIN CONTENT GOES HERE. MAIN CONTENT GOES HERE.
<?php
include("top_items_list.html");
?>
</div>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////-->
<!-- ////////////////////////////////////////////////////////END OF PAGE SPECIFIC CONTENT///////////////////////////////-->
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////-->


<div style="background-color: #ffffff; border:1px solid black; width: 800px; height: 170px; float:left;">
<?php
include("googleads_bottom.php");
?>
<?php
include("menu_bottom.php");
?>
</div>

</div>

met
11-03-2009, 02:31 PM
a link to your page would be very useful

my guess is when you include top_list.html you are floating its contents, and not clearing the container so the height doesn't expand as you wish.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum