Skip to content

Commit 2a986e3

Browse files
committed
Responsive CSS for mobile searchbar
1 parent 42d0e08 commit 2a986e3

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,16 @@
5252
</button>
5353
<a class="navbar-brand" href="#"><h2>Ungentry</h2></a>
5454
</div>
55-
<div id="navbar" class="navbar-collapse collapse" style="padding-right: 0px;">
55+
<div id="navbar" class="navbar-collapse collapse">
5656

5757

5858
<form class="navbar-form navbar-right" role="search">
59-
<div class="form-group">
59+
<div class="input-group">
6060
<input type="text" id="address" class="form-control" placeholder="Search for addresses">
61+
<span class="input-group-btn">
62+
<button type="button" id="sendaddress" class="btn btn-default">Submit</button>
63+
</span>
6164
</div>
62-
<button type="button" id="sendaddress" class="btn btn-default">Submit</button>
6365
</form>
6466

6567
<ul class="nav navbar-nav navbar-right">

src/style.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,15 @@ footer {
3636
margin-top: -10px;
3737
}
3838

39-
.navbar-form {
40-
padding-right: 0px;
39+
@media (min-width: 768px) {
40+
.navbar-collapse {
41+
padding-right: 0px;
42+
}
43+
.navbar-form {
44+
padding-right: 0px;
45+
}
4146
}
47+
4248
/*
4349
.navbar-nav>li>a {
4450
padding-top: 10px;

0 commit comments

Comments
 (0)