-
div Float
I'm not sure if I'm doing it right but it doesn't seem to view right. This is the code btw.
Code:
<html>
<head>
<style>
body {
font: 9pt arial;
}
div.float {
float:left;
}
</style>
</head>
<body>
<div class="div.float">
<img src="31peace.jpg"></div>
Kids take up arms as way out of poverty, study says
November 16, 2005<br>
ELSEWHERE in the world, children are abducted and forced or tortured
into joining armed movements. But in the Philippines, they apparently
freely do so.<br>
<br>
</body>
</html>
All I just need is the image to float left and the text besides it on the right. Something wrong with my code?
-
Re: div Float
-
1 Attachment(s)
Re: div Float
I need the texts to be beside the image, but this I get.
-
Re: div Float
Have you tried putting the text in paragraph tags?
HTML Code:
<html>
<head>
<style>
body {
font: 9pt arial;
}
div.float {
float:left;
}
</style>
</head>
<body>
<div class="div.float">
<img src="31peace.jpg"></div>
<p>Kids take up arms as way out of poverty, study says
November 16, 2005<br>
ELSEWHERE in the world, children are abducted and forced or tortured
into joining armed movements. But in the Philippines, they apparently
freely do so.<br>
<br></p>
</body>
</html>
-
Re: div Float
Tried and nothing happens. Except for bringing the text down a little. :(
-
Re: div Float
I have looked at your styles, you should use just float as the class name for the div. Also you may want to just flaot the image, not have it inside the div.
-
Re: div Float
I missed that part. Works fine now, thanks a lot.