I have a div and, inside it, an unordered list with several list items that serve as navigation menu items. The list items, when hovered over, turn a certain background color different from other items in the list. I wonder how I can make sure that the list items always completely fill the div horizontally, no matter what the zoom level. Currently, when I view the page at 100% zoom, the list items fill the navigation div completely (there is no empty space between the last list item and the right border of the div), but when I zoom out, an empty area appears to the right of the last list item.
Ideally, I would like to do this using CSS. What property or properties in the CSS should I adjust to make sure that the div and the space taken up by the list items always shrink or expand at the same rate when I zoom in or out?
I myself can't see the HTML code (I'm modifying a template), which also means that I can't set the width for each list item individually, but the CSS for the unordered list looks as follows:
#navigation ul {
width: 100%;
resize: vertical;
}
#navigation li {
float: left;
position: relative;
resize: vertical;
}
The resize:vertical and float:left were added by me as part of my efforts to make the unordered list always span the width of the div. As you can see, the unordered list's width is already set to 100%, and yet it does not fill the div except when the page is viewed at 100% zoom. If nothing else works, is there a way to make the div or the font of the menu items not be resized when the user zooms in or out on the page?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)