Here is some HTML code that I need help with:
<div id='nav'><a href ='./?page=1'>1</a> 2 <a href ='./?page=3'>3</a> <a href ='./?page=4'>4</a> <a href ='./?page=5'>5</a></div>
I am trying to create a navigation menu where the current page is always centered. However, using text-align:center
centers the number '3', which is not what I want. How can I ensure that the current page number is always in the center, even if it's not the middle element?
EDIT:
To clarify further, the desired layout should look like this:
1 2 3 4 5
^
|
This should be centered on the page while maintaining consistent spacing between the other numbers. As a result, the links will be slightly off-center to the right, but the current page number will be perfectly centered.