...

View Full Version : <p>Text</p> is not on div top 0px position even and when I set it so?



bloody86
11-10-2010, 04:48 PM
Hi to everyone!

As title says
"<p>Text</p> is not on div top 0px position even and when I set it so?"

Why? And how I can make it be?

Here is the code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="txtarea" style=" position: absolute; left: 610px; top: 232px; height:454px; width: 300px;overflow:hidden; border-width: 2px; border-style: solid; border-color: red; ">
<p align="justify" class="drag" id="1" style="top: 0px; width:260px">
If you have an interesting related post on your own site you can leave a trackback.<br />
<br />
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
once. If you have an interesting related post on your own site you can leave a trackback.
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have
to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
<br />
If you have an interesting related post on your own site you can leave a trackback.<br />
<br />
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
once. If you have an interesting related post on your own site you can leave a trackback.
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have
to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
<br />
If you have an interesting related post on your own site you can leave a trackback.<br />
<br />
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
once. If you have an interesting related post on your own site you can leave a trackback.
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have
to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
<br />
If you have an interesting related post on your own site you can leave a trackback.<br />
<br />
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
once. If you have an interesting related post on your own site you can leave a trackback.
As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have
to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
<br />
</p>
</div>
</body>
</html>

teedoff
11-10-2010, 05:01 PM
where do you want this div to be in relation to the page? Also, you know you can use more than one <p> tag in place of all those breaks.

abduraooft
11-10-2010, 05:04 PM
You need to remove browse specific default value of margin from that paragraph, by setting margin:0; instead of top

Or add
*{margin:0;padding:0;} in to your CSS

bloody86
11-10-2010, 05:26 PM
Thanks! That's exactly what I needed!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum