question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting Search + Buttons in navigation bar

See original GitHub issue

I’m trying to find a way to make the navigation bar entirely a search box except for 1-2 buttons on the very right. Right now I can get the icon buttons to show up on the same row but the search box is really tiny (I want to fill all space except for the space occupied by the right button(s)).

Is there a built-in way to do this in materialize that I’m missing or do I need to do some CSS overriding? Which the latter is fine but I wanted to ask to see if I’m missing anything obvious.

Here is some code I’m playing with:

<nav>
    <div class="nav-wrapper">
        <ul class="right">
            <li><a href="#"><i class="mdi mdi-close"></i></a></li>
        </ul>
        <form class="left">
            <div class="input-field">
                <input id="search" type="search" />
                <label for="search"><i class="mdi mdi-magnify"></i></label>
            </div>
        </form>

    </div>
</nav>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9

github_iconTop GitHub Comments

19reactions
ferbispojesuscommented, Sep 16, 2016

Solution ->

input[type=“search”] { height: 64px !important; /* or height of nav */ }

3reactions
Inamaciocommented, Aug 21, 2017

I had this same problem of stylizing the search bar in the navalize of materialize, I got the code snippet from friend @ahlechandre ahlechandre and I modified it to stay as I wanted, follow the code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create a Search Bar - W3Schools
Learn how to add a search box inside a responsive navigation menu. ... Add a black background color to the top navigation bar...
Read more >
How to add a search box to your website's navigation bar
Add a search box to your website that allows users to search from the navigation bar. Free tutorial and example code included!
Read more >
Create a Search Bar using HTML and CSS - GeeksforGeeks
To create a search bar in the navigation bar is easy, just like creating another option in the navbar that will search the...
Read more >
How to create navigation bar with searchbox - YouTube
Simple Navigation bar with Search Box | How to create navigation bar with searchboxFollow this Channel ...
Read more >
Responsive Navbar with Search Box using HTML CSS ...
To create this program (Responsive Navbar with Search Box). First, you need to create two Files one HTML File and another one is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found