Page 1 of 1
PHP includes + <div> tags
Posted: Thu Jul 07, 2005 4:56 pm
by AlbinoJellyfish
I have been trying to get this website to look nice, but for some reason the includes overlap.
An example:
http://www.edienterprises.com/prepaid/Platforms.php
This is the code for that page
Code: Select all
<?php # homepage - index.php
// Set the page title and include the HTML header.
$page_title = 'EDI Enterprises:GR-303, GR303, V5, TTCN, CALEA, protocol stacks';
include ('header.inc');
?>
<?php
include ('sidemenu.inc'); // Include the HTML footer.
?>
<div id = "Content">
The different platforms are:
GEM-THUNDER
This one...
GEM-LIGHTNING
This platform...
ODIN
Analyzes...
</div>
<?php
include ('footer.inc'); // Include the HTML footer.
?>
If you need to view the includes:
http://www.edienterprises.com/prepaid/header.inc
http://www.edienterprises.com/prepaid/footer.inc
http://www.edienterprises.com/prepaid/sidemenu.inc
I appreciate any help!
Posted: Thu Jul 07, 2005 5:04 pm
by Burrito
dont' absolutely position your divs and you wont' have that problem.
if you do want them absolutely positioned, then move them where they won't overlap other elements on the page.
Posted: Thu Jul 07, 2005 5:15 pm
by AlbinoJellyfish
Ok, I'm new to divs, so how do I not absolutely position them, can I get an example?
Posted: Thu Jul 07, 2005 5:17 pm
by Burrito
look in your stylesheet:
it will say something like position:absolute, just take that out or change it to relative.
Posted: Thu Jul 07, 2005 5:25 pm
by AlbinoJellyfish
Hmm, that didn't seem to work. It only made a mess of things. Is there a way in the code to make it come after the sidemenu.inc instead of in it?
Posted: Thu Jul 07, 2005 5:32 pm
by Burrito
where stuff is included (php side) isn't the problem (with the overlapping divs). What's happening is the brwoser is getting the code and rendering it according to a few things:
1) the position of the tags on the page (raw)
2) the elements of your style sheet
there is no reason (from what I saw) to have anythign absolutely positioned. You might try removing the stylesheet altogether to get the page set up the way you want, then add it and see where it throws things off, the ones that don't line up the way you want (div elements) obviously need to be tweaked (moved)...but as I said, from what I looked at, you don't need to position any of them aboslutely.
Posted: Thu Jul 07, 2005 5:38 pm
by AlbinoJellyfish
Ok, so I removed the absolute positioning from all of my css file.
http://www.edienterprises.com/prepaid/Platforms.php
So should I just code it to look the way i want in html now?
Posted: Thu Jul 07, 2005 6:09 pm
by Burrito
I still see overlapping

Posted: Thu Jul 07, 2005 6:27 pm
by AlbinoJellyfish
Ok, thanks for your help. These <div> tags confuse me. This site wasn't designed by me, I'm just trying to fix some bugs, this being one of them. I might just recode it totally.
BTW heres the css file if you can spot something noticably wrong.
Code: Select all
/************GENERIC SECTION************/
body {
margin:0px;
padding:0px;
font-family:verdana, arial, helvetica, sans-serif;
color:#000;
background-color:white;
/*background-repeat: repeat-x;
background-image: url(back.gif)}*/
}
h1 {
margin:0px 0px 15px 0px;
padding:0px;
font-size:28px;
line-height:28px;
font-weight:900;
color:#000;
}
h2 {
margin:20px 0px 10px 0px;
padding:0px;
font-size:12px;
font-weight:600;
}
pre {
line-height:14px;
font-size:11px;
text-decoration:none;
font-weight:400;
font-family:verdana, arial, helvetica, sans-serif;
}
p {
font:11px/20px verdana, arial, helvetica, sans-serif;
margin:0px 0px 16px 0px;
padding:0px;
}
a {
font-size:11px;
text-decoration:none;
font-weight:400;
font-family:verdana, arial, helvetica, sans-serif;
}
a:link {color:#000;}
a:visited {color:#000;}
a:hover {/*background-color:#ccc;*/
color:#F00;
text-decoration: underline;
}
img {
border-style: none;
}
html {
padding:0px;
margin:0px;
}
/************HEADER************/
#Header {
margin:30px 0px 15px 0px;
padding:17px 0px 10px 26px;
/*border-style:solid;
border-color:#ccc;
border-width:1px 0px 1px 0px;*/
line-height:11px;
/*background-color:#eee;*/
}
#EDIdescription {
// position:absolute;
top:50px;
left:240px;
width:400px;
line-height:14px;
font-size:11px;
text-decoration:none;
font-weight:400;
font-family:verdana, arial, helvetica, sans-serif;
}
#EDIlabel {
font-size:12px;
font-weight:600;
color:#008;
}
#Horizontalmenu {
color:#cc0;
// position:absolute;
top:142px;
left:30px;
width:400px;
line-height:14px;
font-size:11px;
font-family:verdana, arial, helvetica, sans-serif;
}
/************LEFT MENU************/
#Verticalmenu {
// position:absolute;
top:160px;
left:20px;
width:170px;
height:500px;
padding:10px;
/*background-color:#eee;
border:1px solid #999;
border-width:0px 1px 0px 0px;*/
line-height:17px;
}
#Productheader {
color:#008;
font-size:12px;
font-weight:600;
/*text-decoration: underline*/
}
#Solutionsheader {
color:#800;
font-size:12px;
font-weight:600;
/*text-decoration: underline*/
}
#Technicalheader {
color:#cc0;
font-size:12px;
font-weight:600;
/*text-decoration: underline*/
}
/************CONTENT************/
#Content {
margin:0px 50px 50px 230px;
padding:10px;
width:450px;
font-size:11px;
font-family:verdana, arial, helvetica, sans-serif;
}
/************FOOTER************/
#Footer {
font-size:11px;
font-family:verdana, arial, helvetica, sans-serif;
// position:absolute;
left:90px;
}
/************PAGE SPECIFIC************/
/************index.php************/
/*containing box only*/
#Producthighlightheader {
font-size:12px;
font-weight:600;
}
#Newsevents {
color:#00f;
}
#Producthighlightbox{
margin:20px 0px 0px 0px;
width:395px; /*tweak this value to line it up with the image*/
height:100px;
padding:10px;
border-style:solid;
border-color:#898989;
border-width:1px 1px 1px 1px; /* top and bottom borders: 1px; left and right borders: 0px */
line-height:11px;
background-color:#c2c2c2;
}
Posted: Thu Jul 07, 2005 6:28 pm
by Burrito
#Footer