Web Analytics Made Easy -
StatCounter div box - CodingForum

Announcement

Collapse
No announcement yet.

div box

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • div box

    Hi,

    i am trying to create a box using the div tag, the boex needs to be 300px width and 200 px in height, it also needs a header section, and two columns below, the left column for text and the right to hold a small picture in tyhe centre.

    can anyone help,

    not worried about styling or anything yet, just an outline of the section would be great.

    thanks in advance.

  • #2
    This should get you started:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    
    <style type="text/css">
    #container {
    	width: 300px;
    	height: 200px;
    	min-height: 200px;
    	border: 2px solid #000;
    	margin: auto;
    	}
    
    #side {
    	float: left;
    	width: 195px;
    	}
    
    #content {
    	float: left;
    	width: 95px;
    	}
    
    h1 {
    	text-align: center;
    	}
    </style>
    </head>
    
    <body>
    <div id="container">
    	<h1>This would be the header</h1>
    	<div id="side">
    		<p>Add your text here</p>
    	</div>
    	<div id="content">
    		<p>Add your image here</p>
    	</div>
    </div>
    </body>
    </html>

    Comment

    Working...
    X