Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: div box

  1. #1
    Kal
    Kal is offline
    Regular Coder
    Join Date
    Dec 2005
    Posts
    309
    Thanks
    0
    Thanked 0 Times in 0 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
    Regular Coder
    Join Date
    Dec 2005
    Location
    Ohio
    Posts
    286
    Thanks
    7
    Thanked 9 Times in 9 Posts
    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>


  •  

    Posting Permissions

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