简体   繁体   中英

HTML element percentage height problem

i made myself a Speed Dial-like homepage with links I visit the most. Now, i made it elastic, so when browser window is narrowed horizontally, the boxes getting narrower too.

What I want is that when browser window is narrowed vertically, that boxes get narrower again.

I tried with several percentage height rules but it didn't work, need help.

Here is the page I'm working on its one-file page so CSS is not separated. http://www.purplerspace.com/dl/

You have to add the height percentages to almost all the divs if you want it to work. Add height: 100% to html, body then the wrappers and also the lis and yeah, the a style too.

Don't know if it's optimal but tables for this should work. Set the table height and width to 100%. And don't forget to set your html and wrapper tag to 100% in height.

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