im doing a school project, where i have to make a website in HTML/CSS and use java. Only using text editors (no bootstrap).
And im stuck on my navbar, when i resize the page (make it smaller), the navbar goes down and overlays on top of my header.
How do i make the navbar not do this, either shrink into a dropdown or just go away?
Adrian Perez
screenshot nigga
Isaac Powell
lol I could answer that but tl;dr just go to stack overflow
Jaxon Miller
Give me the screenshot and a code
Andrew Reed
uhh sauce?
Lincoln Myers
screenshot it and post that part of the code m8
Eli Kelly
>Only using text editors (no bootstrap). I've been coding for years and never needed anything other than notepad++/sublime for anything. Post the code so we see what went wrong
Nathaniel White
Yea, i just had to take out some shit that had my full name in it
ill post what its doing in a screenshot soon, give sec
Gavin Gray
position:relative ?
Josiah King
This is what its doing
Elijah Gray
Java != Javascript
Jason Jenkins
the code in their that isnt being used is from my many failed attempts at fixing it
Matthew Wood
> use java
What are you, fucking retarded? Who uses java in their browser nowadays
Ayden Allen
javascript.
im just following the teachers instructions pal
Adam Garcia
If you were following their instructions properly, your nav bar would work right now, just sayin'.
Sebastian Carter
Install gentoo
Ryder Turner
Eh, the other person ive talked to is having the same issue.
Maybe its not vital, or something we need to learn this year, but i think it looks horrid and wasnt to fix it. Or im autistic and overlooked it
Christian Butler
I found the issue!
In the file "b.html", you never have an opening and tag. You do have a closing tag, but of course you need to open the environment first. If you add those in, maybe it'll work.
Charles Rivera
Also, don't forget to add a header with the necessary tag to include your stylesheet!!
Xavier Evans
I do, i just deleted the entire head and i guess i took the body open tag with it, because it had my full name, school etc in it.
I double checked though, and they were there
Levi Allen
It's bad practise to use divs for each and everything. The tag provided by HTML5 would be much more appropriate for this case.
Colton Morgan
Here's an idea:
You could use JavaScript to check whether the necessary width for the div "hold" to be able to literally hold all of those list objects without line-breaking is smaller than the width of your actual nav bar. If that's the case, the nav-bar should just stay the way it is, with the list elements being listed next to each other. If it isn't, you implement your burger-menu or whatever you want to do in order for the nav to be more compact.
Luke Wilson
A few things, You have a DIV container around the tag, this is unnecessary.
Looking at the screenshot here I'm assuming the part to the right is the mobile version, you haven't got any media queries to specify that you'll need to to rearrange the styling of the menu when you're on a narrow viewport, you can set a media query for a max size of say 720px, make the nav bar taller and stack the list vertically, then for your javascript/jQuery, build a button that reveals that menu on press for mobiles.
Chase Hall
put it in the list style, and worked a charm. Thanks user