As I say I am creating the css dynamicaly from within the php code but if you can sort out the layout etc. I should be able to write that into my code.
The layout is a bit different to the photo now as I have been messing with the top margin etc. a bit on the first 3 boxes from the left.
PHP Code:
<html>
<head>
<style>
body {
margin:0;
padding:0;
line-height: 1.5em;
}
#maincontainer {
width: 960px;
margin: 0 auto;
}
</style>
<body>
<div id="maincontainer">
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 600;
left: 0;
margin-top: 20;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 0<br>
ID number = 1<br>
Kenel club name = Willow as in tree </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 200;
left: 265;
margin-top: 250;
background-color: lightblue;
border: 1px black solid;
width:250px;">Generation = 1<br>
ID number = 2<br>
Kenel club name = Puppies father </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 200;
left: 265;
margin-top: 250;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 1<br>
ID number = 3<br>
Kenel club name = Puppies mother </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 530;
margin-top: 20;
background-color: lightblue;
border: 1px black solid;
width:250px;">Generation = 2<br>
ID number = 4<br>
Kenel club name = Grandparent 21 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 530;
margin-top: 20;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 2<br>
ID number = 5<br>
Kenel club name = Grandparent 22 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 530;
margin-top: 20;
background-color: lightblue;
border: 1px black solid;
width:250px;">Generation = 2<br>
ID number = 6<br>
Kenel club name = Grandparent 23 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 530;
margin-top: 20;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 2<br>
ID number = 7<br>
Kenel club name = Grandparent 24 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: lightblue;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 8<br>
Kenel club name = GT Grandparent 31 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 9<br>
Kenel club name = GT Grandparent 32 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: lightblue;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 10<br>
Kenel club name = GT Grandparent 33 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 11<br>
Kenel club name = GT Grandparent 34 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: lightblue;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 12<br>
Kenel club name = GT Grandparent 35 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 13<br>
Kenel club name = GT Grandparent 36 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: lightblue;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 14<br>
Kenel club name = GT Grandparent 37 </div><br>
<div style="
position: relative;
padding: 0px 5px 1px 5px;
top: 20;
left: 795;
margin-top: 20;
background-color: pink;
border: 1px black solid;
width:250px;">Generation = 3<br>
ID number = 15<br>
Kenel club name = GT Grandparent 38 </div><br>
</div>
</body>
</html>
The first photo was created with css BUT I had a div for every position. I could do it again this way but would need nearly 40 different divs.
PHP Code:
<html>
<head>
<style>
body {
margin:0;
padding:0;
line-height: 1.5em;
}
#maincontainer {
width: 960px;
margin: 0 auto;}
#first_d {
position: absolute;
padding: 50px 20px 50px 20px;
margin-top: 345px;
margin-left: 10px;
background-color: lightblue;
border: 1px black solid;
width:250px;
}
#first_b {
position: absolute;
padding: 50px 20px 50px 20px;
margin-top: 345px;
margin-left: 10px;
background-color: pink;
border: 1px black solid;width:250px;
}
#Second_s {
position: absolute;
padding: 3px 5px 5px 5px;
margin-top: 175px;
margin-left: 200px;
background-color: lightblue;
border: 1px black solid;width:250px;
}
#Second_d {
position: absolute;
padding: 3px 5px 5px 5px;
margin-top: 600px;
margin-left: 200px;
background-color: pink;
border: 1px black solid;width:250px;
}
#third_sl {
position: absolute;
padding: 3px 5px 5px 5px;
margin-top: 110px;
margin-left: 460px;
background-color: lightblue;
border: 1px black solid;width:250px;
}
#third_dl {
position: absolute;
padding: 3px 5px 5px 5px;
margin-top: 250px;
margin-left: 460px;
background-color: pink;
border: 1px black solid;width:250px;
}
#third_sr {
position: absolute;
padding: 3px 5px 5px 5px;
margin-top: 530px;
margin-left: 460px;
background-color: lightblue;
border: 1px black solid;width:250px;
}
#third_dr {
position: absolute;
padding: 3px 5px 5px 5px;
margin-top: 680px;
margin-left: 460px;
background-color: pink;
border: 1px black solid;width:250px;
}
#fourth_1 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 5px;
margin-left: 730px;
background-color: lightblue;
border: 1px black solid;width:250px;
}
#fourth_2 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 110px;
margin-left: 730px;
background-color: pink;
border: 1px black solid;width:250px;
}
#fourth_3 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 225px;
margin-left: 730px;
background-color: lightblue;
border: 1px black solid;width:250px;
}
#fourth_4 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 330px;
margin-left: 730px;
background-color: pink;
border: 1px black solid;width:250px;
}
#fourth_5 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 450px;
margin-left: 730px;
background-color: lightblue;
border: 1px black solid;width:250px;
}
#fourth_6 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 555px;
margin-left: 730px;
background-color: pink;
border: 1px black solid;width:250px;
}
#fourth_7 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 665px;
margin-left: 730px;
background-color: lightblue;
border: 1px black solid;width:250px;
}
#fourth_8 {
position: absolute;
padding: 0px 5px 1px 5px;
margin-top: 770px;
margin-left: 730px;
background-color: pink;
border: 1px black solid;width:250px;
}
</style>
<body>
<div id="maincontainer">
<div id="first_b"><b>Puppie</b> <br/>17th Oct 2005<br/><b>KC name:</b> Willow as in tree<br/><b>KC number:</b> 1</div>
<div id="Second_s"><b>Level 1</b> <br/>21st Oct 2010<br/><b>KC name:</b> Puppies father<br/><b>KC number:</b> 11</div>
<div id="third_dl"><b>Level 2</b> <br/>12th Oct 2010<br/><b>KC name:</b> Grandparent 22<br/><b>KC number:</b> 22</div>
<div id="fourth_3"><b>Level 3</b> <br/>23rd Oct 2010<br/><b>KC name:</b> GT Grandparent 33<br/><b>KC number:</b> 33</div>
<div id="fourth_4"><b>Level 3</b> <br/>4th Oct 2010<br/><b>KC name:</b> GT Grandparent 34<br/><b>KC number:</b> 34</div>
<div id="third_sl"><b>Level 2</b> <br/>29th Oct 2010<br/><b>KC name:</b> Grandparent 21<br/><b>KC number:</b> 21</div>
<div id="fourth_1"><b>Level 3</b> <br/>22nd Oct 2010<br/><b>KC name:</b> GT Grandparent 31<br/><b>KC number:</b> 31</div>
<div id="fourth_2"><b>Level 3</b> <br/>12th Oct 2010<br/><b>KC name:</b> GT Grandparent 32<br/><b>KC number:</b> 32</div>
<div id="Second_d"><b>Level 1</b> <br/>1st Oct 2010<br/><b>KC name:</b> Puppies mother<br/><b>KC number:</b> 12</div>
<div id="third_dr"><b>Level 2</b> <br/>29th Oct 2010<br/><b>KC name:</b> Grandparent 24<br/><b>KC number:</b> 24</div>
<div id="fourth_7"><b>Level 3</b> <br/>2nd Oct 2010<br/><b>KC name:</b> GT Grandparent 37<br/><b>KC number:</b> 37</div>
<div id="fourth_8"><b>Level 3</b> <br/>20th Oct 2010<br/><b>KC name:</b> GT Grandparent 38<br/><b>KC number:</b> 38</div>
<div id="third_sr"><b>Level 2</b> <br/>28th Oct 2010<br/><b>KC name:</b> Grandparent 23<br/><b>KC number:</b> 23</div>
<div id="fourth_5"><b>Level 3</b> <br/>27th Oct 2010<br/><b>KC name:</b> GT Grandparent 35<br/><b>KC number:</b> 35</div>
<div id="fourth_6"><b>Level 3</b> <br/>27th Oct 2010<br/><b>KC name:</b> GT Grandparent 36<br/><b>KC number:</b> 36</div>
</div>
</body>
</html>
Bookmarks