www.webdeveloper.com
Results 1 to 3 of 3

Thread: Trying to add and align something in this DIV

  1. #1
    Join Date
    Dec 2008
    Posts
    76

    Trying to add and align something in this DIV

    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

    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.

  2. #2
    Join Date
    Mar 2007
    Location
    USA
    Posts
    449
    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.

  3. #3
    Join Date
    Dec 2008
    Posts
    76
    Quote Originally Posted by infinityspiral View Post
    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles