I'm new to working with HTML and CSS. My goal is to have navigation buttons that are all the same size, occupying one third of the width of the panel they are placed in. I have access to the original code but can only make adjustments rather than completely replacing it.
The buttons are organized in an unordered list and should span the entire width of the panel where they reside. In Internet Explorer, they display uniformly in size, however in Chrome and Firefox, there are slight discrepancies: the button containing the shortest text appears smaller, while longer text causes the button to expand accordingly. Despite the text being much smaller than the buttons, they seem to affect the button sizes.
The code currently sets the list item elements at 1% width, known as a workaround for achieving similar sizes. Intuitively, using 33% should create the desired uniformity, yet the total occupied width by the three buttons amounts to approximately 33%, leaving empty space. Experimenting with different percentages yields inconsistent results: lower percentages work better on wider screens but fail on narrower ones; anything above 10-33% causes the buttons to gradually shrink instead of filling the available space.
Various attempts to modify the display property for the li elements or ul elements have not yielded the expected outcomes. Reducing the max-width for the text strings did not prevent the buttons from scaling based on string length.
The provided code snippet:
[insert updated code snippet here]
[insert updated HTML structure here]
My aim is to ensure all three buttons maintain the same size regardless of the page's width when arranged in a single row (with vertical stacking below a certain width). What could be causing this issue?
Thank you for any assistance.