Markxxx
04-02-2007, 01:31 AM
I wrote a script. Basically I want to present a jpg then a space then put some information in a box
I used CSS.
The script works fine but here's the issues. I can load the script 5-10-20 times and it works fine. Then all of a sudden the spacing goes WAY off
I wrote the script below. It seems to be OK then the spacing goes off. If you copy and paste the script you can see there are two sections and there is an inch or so which is the way I want it. Suddenly there will be 7 or 8 inches between section 1 and 2 and I have no idea why? Or why it's so erractic. It does this in Firefox and K-Meleon. I tried it in IE and it seems OK there, I haven't had a spacing issue.
Can anyone tell me what I did wrong with the script below? I need it to be consistant all the time.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>test</title>
<style type="text/css">
.body
{float: right;
border-width: thin;
border-style: solid;
width: 60%;
margin: 0cm
padding 0cm;
}
.pic{
width: 30%;
border-width: thin;
border-style: solid;
margin: 0cm;
padding 0cm;
}
.clr{clear: right;}
h3{text-align: center}
</style>
</head>
<body>
<h1>
Example.Com
</h1>
<div><br /><br /></div>
<div class="body">
University of XXXXXXXXXX-1
<br /><br />
City Location
<br /><br />
Dates
<br /><br />
Degree
</div>
<div class="pic">
<img src="jpgs/xxx.jpg" alt="XXXXXXX-1 jpg"/>
</div>
<div class="clr"><br /></div>
<div class="body">
University of XXXXXXXXXX-2
<br /><br />
City Location
<br /><br />
Dates
<br /><br />
Degree
</div>
<div class="pic">
<img src="jpgs/xxx.jpg" alt="XXXXXXX-2 jpg"/>
</div>
<h3 class="clr">
Additional Education</h3>
<p>
XXXXXXXXXXXXXXX
<br /><br />
XXXXXXXXXXXXXXXXX
<br /><br />
XXXXXXXXXXXXXXXXXXXXX
</p>
</body>
</html>
I used CSS.
The script works fine but here's the issues. I can load the script 5-10-20 times and it works fine. Then all of a sudden the spacing goes WAY off
I wrote the script below. It seems to be OK then the spacing goes off. If you copy and paste the script you can see there are two sections and there is an inch or so which is the way I want it. Suddenly there will be 7 or 8 inches between section 1 and 2 and I have no idea why? Or why it's so erractic. It does this in Firefox and K-Meleon. I tried it in IE and it seems OK there, I haven't had a spacing issue.
Can anyone tell me what I did wrong with the script below? I need it to be consistant all the time.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>test</title>
<style type="text/css">
.body
{float: right;
border-width: thin;
border-style: solid;
width: 60%;
margin: 0cm
padding 0cm;
}
.pic{
width: 30%;
border-width: thin;
border-style: solid;
margin: 0cm;
padding 0cm;
}
.clr{clear: right;}
h3{text-align: center}
</style>
</head>
<body>
<h1>
Example.Com
</h1>
<div><br /><br /></div>
<div class="body">
University of XXXXXXXXXX-1
<br /><br />
City Location
<br /><br />
Dates
<br /><br />
Degree
</div>
<div class="pic">
<img src="jpgs/xxx.jpg" alt="XXXXXXX-1 jpg"/>
</div>
<div class="clr"><br /></div>
<div class="body">
University of XXXXXXXXXX-2
<br /><br />
City Location
<br /><br />
Dates
<br /><br />
Degree
</div>
<div class="pic">
<img src="jpgs/xxx.jpg" alt="XXXXXXX-2 jpg"/>
</div>
<h3 class="clr">
Additional Education</h3>
<p>
XXXXXXXXXXXXXXX
<br /><br />
XXXXXXXXXXXXXXXXX
<br /><br />
XXXXXXXXXXXXXXXXXXXXX
</p>
</body>
</html>