Click to See Complete Forum and Search --> : Trying to add and align something in this DIV


livewire1974
02-27-2009, 09:37 AM
Hi,
I hope somebody can help.

Here is a weather pic i am adding to my page, but, I want to add the current time to the top right of the square ( beside the pic and up a little bit). Can somebody show me where to put the DIV for the time?


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>
<style type="text/css" media="screen">
#weather{
padding:0px 50px;
float:left}
#weathertext{
padding:0px 10px;
}
#weathertime{
padding:0px 50px;
}
</style>
</head>

<body>
<div id = "weather">

<?
print "<img src=http://us.i1.yimg.com/us.yimg.com/i/us/we/52/28.gif>";
?>Dublin, Ireland
<div id ="weathertext">
<?
print " 34"."&deg; C"; // 16
?>
</div>
</div>
</body>
</html>



thanks in advance.

infinityspiral
02-27-2009, 10:59 AM
You could put it after #weathertext or before #weather. You may need to drop #weather and #weathertext in their own div to keep their alignment in tact before you start making adjustments to the other text.

livewire1974
02-28-2009, 11:26 AM
You could put it after #weathertext or before #weather. You may need to drop #weather and #weathertext in their own div to keep their alignment in tact before you start making adjustments to the other text.

I dont understand, can somebody show me how to do it?