9
I created a id
in css with a background. When I put the div
in html the background looks beautiful, but when I put a <form>
, the part he occupies turns white.
Note: when I put the text in bold also the same.
How can I fix this?
Here’s an example in Jsfiddle and my code is like this:
CSS
#backgroundSlider{
width: 100%;
background: #000;
height: 300px;
}
HTML
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head><title>Página de Contato</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="site">
<div id="barramenu">menu menu menu menu</div>
<div id="backgroundSlider">
slider
<form>
Nome: <input type="text" name="nome"/><br>
Email: <input type="email" name="email"/><br>
Mensagem: <input type="text" name="menssagem"/><br>
<input class="button" type="submit" value="Enviar"/>
</form>
</div>
<div id="backgroundInfo">
Background info
</div>
<div id="rodape">rodape</div>
</div>
</body>
</html>
Felipe, welcome to Stackoverflow! I think the vote was a bit harsh because there was a lot of information missing. Now the question looks much better! To add HTML just use spacing (4 spaces) or use
\``, por exemplo assim:
`var foo;`, teste isso no seu
<form>` which is hidden in the question. By the way, can you create a jsFiddle with this problem? So you will get a certainly quicker answer.– Sergio
Do you have any css rules for the form? it may be that it has the background-color set in white, so when you put the form on the page its background turns white. Can I mount a Jsfiddle? http://jsfiddle.net/
– Marciano.Andrade
Edited, and thanks for the tips and personal patience.
– Felipe Henriques
Jsfiddle: http://jsfiddle.net/7r7b4/ The form is not formatted, by default..
– Felipe Henriques