0

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>

Edited by Malymieczek

3
Contributors
6
Replies
7
Views
4 Years
Discussion Span
Last Post by Malymieczek
0

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

0

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" />

Edited by Octet: Additional Information

0

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.

Edited by Malymieczek

0

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

1

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

Edited by JorgeM

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.