I’ve having a rather stressful issue. I applied a div class called input to style the boxes on my username /password fields like in the picture below.

However now I want to apply a different styling to the search bar but no matter what I do even If I use a inline style sheet it uses the style of the old input element. I tried pretty much everything.
login html
<div class="form">
<form name="form1" method="POST" action="login.php">
<div class="input">
<input name="username" id="username" placeholder="Username">
<input name="password" id="password" placeholder="Password">
</div>
<input type="submit" name="Submit" value="Login" class="submit">
</form>
</div>
search bar html
<div class="ajax-div">
<div class="searchbar">
<input type="text" onKeyUp="getScriptPage('box','text_content')" id="text_content">
</div>
<div id="box"></div>
</div>
That last width: parameter in input dictates the width of all input bars on the page.
.form {
margin-top:-182px;
margin-left:1100px;
position:static;
width: 220px;
height:150px;
padding: 20px;
padding-top:10px;
border: 1px solid #270644;
background:url(bg-right.png);
}
.label {
font-size: 12px;
font-family: arial, sans-serif;
list-style-type: none;
color: #999;
text-shadow: #000 1px 1px;
margin-bottom: 10px;
font-weight: bold;
letter-spacing: 1px;
text-transform: uppercase;
display: block;
}
input {
/* input boxes*/
-webkit-transition-property: -webkit-box-shadow, background;
-webkit-transition-duration: 0.25s;
padding: 6px;
border-bottom: 0px;
border-left: 0px;
border-right: 0px;
border-top: 1px solid #666;
-moz-box-shadow: 0px 0px 2px #000;
-webkit-box-shadow: 0px 0px 2px #000;
margin-bottom: 10px;
background: #FFF;
width: 130px;
}
the css i’m trying to apply to the search bar:
searchbar {
left: 350px;
top:100px;
width: 300px;
}
Did you try appying the class directly to the input tag OR using this CSS –
The CSS you are trying to apply to searchbar is wrong. Searchbar is the class of the div and not the input box. Try using the CSS above and check if it works