I'm working on making a horizontal desktop navigation responsive. I've changed it to be displayed horizontally on smaller screens but now I have the issue with the drop down submenus, as they cover the parent items underneath. Instead I want the other parent items to be pushed underneath the dropdown.
So something like this
Is it possible to achieve this without jQuery? the people the website is for want to avoid using any more jQuery.
Without seeing code i'm just guessing here...
Try making your dropdown menus relative positioned.
.sub-menu {position:relative;}
Some time help for the this resources[http://www.w3schools.com/bootstrap/bootstrap_case_menu.asp]
Thanks,I've sorted it with setting the height to 100% and changing the position to relative
Related
I want to make a fixed menu in HTML and it does not turn out very well for me, my menu is on the slider and I want it to scroll and emerge and have color. I just managed to keep it floating by placing it in the CSS position: fixed, does anyone know how I can do it?
Beforehand thank you very much.
slider
Use list to make ur menu.. then in css give each list element float:left. Also use a div tag make sure to put ur list in div tag... position:fixed auto
On my website I use pure.css and the navbar consists of more elements than a small screen can display without scrolling. Therefore a scrollbar appears in that case, which I don't want.
I would like the navbar to stay at the top so that the navbar and the content scrolls simultaneously. When I use position:absolute; everything looks even worse. Also the mobile version of that navbar should still work (on mobile screens scrolling though the navbar should still be possible).
I also tried to deactivate overflow-y, but then, obviously, not every element on the navbar is clickable.
If you want that navbar and content scroll simultaneously, you shouldn't use position:fixed.
Remove position:fixed
Add float:left to menu div
Add float:right to content div
If I misunderstood what you want, the comment made by Marco Valente should be nice.
I want to implement a full page width mega menu inside a responsive "container" div.
Bootply example
I want to use a responsive container, but have the menu reach out to the edges of the window. I.e. it needs to expand outside of the parent element and not being limited by the container.
I've tried to use Yamm!3, but it seems to do the same thing as my example, which doesn't work. I know this whole thing kinda breaks the laws of CSS, but I was thinking that there might be some clever work around out there...
I found the answer. I needed to add position static to the dropdown and the next parent div. And then move down the dropdown-menu to make it appear below the menu.
Working example
you just add more style below:
.dropdown, .dropup{position:static}
I want to fix this menu bar at the top of the page, so that when user scrolls down, the menu bar continues to appear and the content flows into it. I tried everything, some help would be nice.
Heres the CSS and below the HTML:
CSS: https://www.dropbox.com/s/a0z0eov71wvha1c/style.css
HTML: https://www.dropbox.com/s/qyvb0oqhx8550ym/html.txt
Thank you!
Use the position: fixed css property. Then the position of the div is relative to the window's viewport rather than the content of the page.
You spelled position in #navigation wrong in your stylesheet, could that be the problem?
This is really easy if you correctly understand how the position attribute works in css.
I have a demo which should help you. You just need to understand how position:fixed is used to make the menu bar stick to top.
http://codepen.io/anon/pen/mvGqf
I am using twitter bootstrap navbar and list items are shown out of navbar when I minimise my browser to some small size and scroll to the end list item.
This is what looks as below.
Navbar when browser is maximised:
Navbar when browser is minimised:
I would like to have the items stick fixed to the navbar even though the browser is minimised.
Define min-width to your Navbar. For example write like this:
.Navbar{
min-width:1000px;
}
http://davidwalsh.name/demo/css-fixed-position.php
something like this? (the yellow box saying "Wherever you go, I will find you!")
if yes, then change position to fixed for NAVIGATION.
position:fixed;
(css)