Reputation:
in html/css
i have simply two form and i want to set that to single row as inline
widthout using float
. you can see this ONLINE DEMO
in this below code i want to set display:inline
to have single row as two div
. like with this screen shot:
<div class='single-page'>
<div id="verification-panel">
<form>
<fieldset>
<legend>verification code</legend>
<label>Mobile Number:</label>
<input type="text" class="inputs" placeholder="EX:">
<span class="help-block"></span>
<button type="button" class="btn">Submit</button>
</fieldset>
</form>
</div>
<div id="activation-panel">
<form>
<fieldset>
<legend>Active Acount</legend>
<label>Verfication code:</label>
<input type="text" class="inputs" placeholder="Verficcation code">
<span class="help-block"></span>
<button type="button" class="btn">Submit</button>
</fieldset>
</form>
</div>
</div>
Upvotes: 1
Views: 265
Reputation: 11
#verification-panel,#activation-panel{
display:inline-block; width:250px;
}
Upvotes: 0
Reputation: 738
Here is a demo
.single-page{
display: inline;
width: 100%;
}
#verification-panel,#activation-panel{
display: inline-block;
width: 49%; // because of margin or etc.
}
Upvotes: 0
Reputation: 466
Copy this code to your CSS section:
.single-page {
display: inline-block;
width: 769px;
}
.verification-panel,
.activation-panel { display: inline-block; }
To get the forms inline, apart from declaring the display: inline-block
to both classes, you have to define a width for the parent container big enough to let them sit besides each other.
Upvotes: 0
Reputation: 1102
use display:inline-block;
#verification-panel,#activation-panel{
display:inline-block;
}
Upvotes: 1