简体   繁体   中英

Drop Down CSS Menu?

I recently installed a drop down menu on my main menu bar and noticed something. The H1 header directly below it moves on the page when I activate the drop down menu. It's like the drop down menu pushes the text out of the way because it is in the way. The header or text moves back when the drop down menu is released. This also happens on other pages with text below. What is causing this and how can I correct it?

It's impossible to say with 100% certainty without seeing your markup, but I'd guess the nested list (ul) in your menu doesn't have it's position set to absolute. Setting it to absolute takes it out of the flow of the page so it appears above other content rather than forcing any content below it down. Show your markup and I can say for certain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM