...

View Full Version : Div problem and layout issues



rip
03-09-2005, 05:37 AM
Ok, I'm not sure exactly how to explain this, but I'll do my best.

I have a header file which is the main file where my page is displayed. It contains my top, left, and right columns that are static and are displayed no matter what link you go to on my site.

The middle content varies and is set as an automatic width to stretch when the window is resized.

When you click on a link, the middle column is the only content that changes and it is displayed and coded in multiple files.

I'll put some of the code I have on here to try to explain more of what my problem is.

Here is part of the relevant code from my css file first:


div.leftColumn {
background: transparent;
border: 0px solid #555;
left: 10px;
padding: 5px;
position: absolute;
top: 246px;
width: 240px; /* Incorrect IE5 value */
z-index: 2;
voice-family: "\"}\"";
voice-family: inherit;
width: 218px;
}

div.topColumn {
background: transparent;
border: 0px solid #555;
margin: 0px 170px 0px 0px;
text-align: center;
min-width: 900px;
padding: 0px;
position: relative;
width: auto;
z-index: 3;
}

div.middleColumn {
background: transparent;
border: 0px solid #555;
margin: 36px 420px 10px 240px;
min-width: 200px;
padding: 5px;
position: relative;
width: auto;
z-index: 3;
}

div.rightColumn {
background: transparent;
border: 0px solid #555;
padding: 5px;
position: absolute;
top: 246px;
float: right;
right: 190px;
width: 240px; /* Incorrect IE5 value */
z-index: 1;
voice-family: "\"}\"";
voice-family: inherit;
width: 218px;
}

Here is the relevant parts of my header file:


<div class="topColumn">BANNER CODE</div>
<div class="leftColumn">
CODE HERE
</div>
<div class="rightColumn">
CODE HERE
</div>

Now in the middle column I have this basic setup:


<div class="middleColumn">
CODE HERE
</div>

Now my question is, is there someway I can "call" this middle column file inside the header file in order to fix some layout issues I have as I don't want to use absolute positioning. Or is there some other way to do this?

Example header file


<div class="topColumn">BANNER CODE</div>
<div class="leftColumn">LEFT COLUMN CODE</div>

CALL MIDDLE COLUMN CODE HERE

<div class="rightColumn">RIGHT COLUMN CODE</div>


You can see what I'm trying to fix here: www.eyeongames.com


Thanks in advance for any help with this!

mcdougals4all
03-09-2005, 11:23 PM
If you're using php includes, you can call one from within another.

So your main page includes the header, and the header in turn includes 'MIDDLE COLUMN'.

Depending on your needs, it could be easiset to just hard code 'MIDDLE COLUMN' into the header.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum