Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navbar-item width #1255

Closed
JoshClose opened this issue Oct 3, 2017 · 7 comments
Closed

navbar-item width #1255

JoshClose opened this issue Oct 3, 2017 · 7 comments

Comments

@JoshClose
Copy link

This is about the Bulma Docs
I'm using Bulma version [0.5.3]
My browser is: Chrome 61.0.3163.100

This is a question. I can't find the answer, so sorry if it's out there and I missed it.

I put a search input in the navbar-start. It's only taking up a small portion of the start. Is there a way to have it be longer or even take up the rest of the navbar-start area? I don't want to put a hard width as I want it to adjust on mobile view.

<div className="navbar-start">
	<div className="navbar-item">
		<form onSubmit={this.handleSearchSubmit}>
			<div className="field has-addons">
				<div className="control">
					<input className="input" type="text" placeholder="Search..." value={searchQuery}
						onChange={e => this.setState({ searchQuery: e.currentTarget.value })} />
				</div>
				<div className="control">
					<button className="button" type="submit">
						<span className="icon">
							<i className="fa fa-search"></i>
						</span>
					</button>
				</div>
			</div>
		</form>
	</div>
</div>
@jgthms
Copy link
Owner

jgthms commented Oct 4, 2017

Have you tried flex-grow: 1 or width: 100%?

@JoshClose
Copy link
Author

Looks like a combination of those on a few elements will do it. I take it there's no built in classes for doing full width on a navbar-item then?

@jgthms
Copy link
Owner

jgthms commented Oct 13, 2017

No but feel free to make a PR. I believe this could help other people as well. Something like is-expanded.

@osirismqz
Copy link

I was wondering exactly the same thing to get an expanded search form inside the navbar.

I ended up applying flex-grow: 1 to navbar-start navbar-item and the form element and also using is-expanded on the input.

It would be nice to have a built in class to do this :)

@doatech
Copy link
Contributor

doatech commented Oct 16, 2017

Made a pull request for this issue.

@jgthms
Copy link
Owner

jgthms commented Oct 26, 2017

Merged!

@jgthms jgthms closed this as completed Oct 26, 2017
@JoshClose
Copy link
Author

Awesome! Thanks @doatech I've too busy with work and other side projects to attempt this myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants