Here is the HTML code I am working with:
<form class="form" action="search.php" method="POST">
<input type="text" id="searchBox" name="name" placeholder="Enter name" oninput="search(this.value)">
</form>
I need the form to extend across the entire width of the window. To achieve this, I have applied the following CSS:
.form{
display: block;
float:left;
width: 100%;
height: 40px;
background-color: yellow;
border:none;
}
However, there seems to be a small margin on both sides, preventing it from going full width.
You can see the issue in the screenshot here.
The <form>
element is nested within the <body>
tag which has the following CSS properties:
body{
background-attachment: fixed;
background-size: 1150px 950px;
background-repeat: repeat-x;
}