I have a bootstrap form with the following css code in it. I have tried to close up the blank spaces in the form by adding margin:0 attribute but still the spaces between the element is there.
css form code
<div class="row-fluid">
<form style="width: 90%; height: 100%; margin-top:1px;" method="post"novalidate="novalidate" class="form well">
<div class="row-fluid">
<div>
<label for="complaints">Message *</label>
<textarea style="width:100%;" name="complaints" rows="3" required></textarea>
</div>
</div>
<div class="form-actions">
<input style="width:100%; background-color:#da291c;" class="btn btn-primary" name="commit" type="submit" value="Send">
</div>
</form>
</div>
this is the picture of the above form
My challenge is to close the gaps on the areas pointed with arrows.
I am using this version of bootstrap
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css">
4
Answers
You can remove the
margin-bottom
that bootstrap adds to the class.control-group
UPDATED jsfiddle with your code
You can use this code:
In bootstrap already they keep on the margin property always. we can overwrite that to solve your problem.
you need to add one class like this:
Add additionally in the form inline style like this:
i think it will helpful
Well if you don’t want any space in between, you definitely don’t want any margin. Move the CSS to it’s own file:
and html:
and you can see the fiddle here: https://jsfiddle.net/6j98311j/