html - How can I make my dropdown menu blocks center aligned under the parent item block? -
i have been trying edit dropdown menu sub-items centered beneath parent items. achieved centering find every time hovered on parent item reveal drop down menu, rest of menu fell bottom of dropdown menu.
here link sample, has coding on 1 side. thank in advance help! starting out css , html , no matter how many videos , tutorials watch , read, can't seem right :(
https://www.w3schools.com/code/tryit.asp?filename=feemwlifamao
try add vertical-align: top; .dropdown css so:
css
.dropdown { vertical-align: top; } also on separate note remove width on .dropdown-content , instead put width on .dropdown make sure both same width , no wacky horizontal position changes on hover. solution make dropdowns position: absolute; , position them relative links. off-topic :)
Comments
Post a Comment