hi all,

Im working on a website and need to make a Divider. I coded one, but no matter what, the form isnt made.
Heres my code. Can anyone tell me whats wrong?

CSS:

#wrapper {width:1000px;
margin:0 auto;
}
#header {background-color:yellow;
text-align:center; height:50px
}
#footer{clear:both; 
background-color:yellow ;
text-allign:center;
}
#navigation {width870px; padding: 20px;
background-color:blue; text-align:left;
height:50px;
}
#content {float:left;width870px;
padding:20px; background-color:gray;
text-align:left; height:500px
}
#sidebar{clear:both;  float: left;
width:50px;  padding:20px; background-color:green;
text-align:right; height:500px;
}

HTML:

<! DOCTYPE html>
<html>
<head> <title>Website</title>
<link rel="css"  type="text/css" href="css.css" />
</head>
<body>

<div  id="header">
This is my header.
</div>
<div  id="navigation">
This is my navigation.
</div>
<div  id="content">
This is my content box.
</div>
<div  id="sidebar">
This is my sidebar.
</div>
<div  id="footer">
This is my footer.
</div>

</body>
</html>

Can you explain what you mean by "form isnt made"? I do not see any form related stuff in the code you provided.

Just following on from what JorgeM has said, in HTML you would write the HTML to display a form as follows:

<form method = "POST/GET" action = "LOCATION TO PHP/ASP" >

    <input type = "text" name = "Text" maxlength = "25" />

    <input type = "submit" value = "Send Form" />

</form>

This is only a basic form, displaying a simple input field and submission button. Where it says 'POST/GET' is how you want the form to be sent to either your PHP or ASP server side.
As always, when accepting user input you must make sure you properly escape your fields. In PHP the best way to do this is to bind it to a parametised statement.

I've also noticed that in your HTML, you have linked to your stylesheet using <link rel="css" type="text/css" href="css.css" /> but you should be using <link rel="stylesheet" type="text/css" href="css.css" />

Im so sorry haha. I meant Divider not form. Ive been working on making the graphics for the site all day so im a little out of it... Basically, I need to make a layout using dividers. But its not working... The code I wrote is above.

What do you mean by 'divider', do you mean just a space between each element? Where do you want the divider to go etc.

How do you want for your divs to be displayed? I am assuming you want the sidebar to be on either the left of the right of the content div? If so, try this instead...

<!DOCTYPE html>
<html>
<head> 
  <title>Website</title>
<style>
#wrapper {width:1000px;margin:0 auto;}
#header {background-color:yellow;text-align:center;height:50px}
#footer {clear:both;background-color:yellow;text-allign:center;}
#navigation {padding:20px;background-color:blue;text-align:left;height:50px;}
#content {float:left;padding:20px;background-color:gray;text-align:left;width:870px;height:500px;}
#sidebar {float:left;padding:20px; background-color:green;text-align:right;width:50px;height:500px;}
</style>
</head>
<body>
<div id="wrapper">
  <div id="header">This is my header.</div>
  <div id="navigation">This is my navigation.</div>
  <div id="content">This is my content box.</div>
  <div id="sidebar">This is my sidebar.</div>
  <div id="footer">This is my footer.</div>
</div>
</body>
</html>

capture2

Thanks JorgeM. It turned out that for some reason the stylesheet wasnt linking to the HTML. After I fixed that, I couldnt get the sidebar to be next to the content. Thanks to your post it works now. Once again thanks so much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.