i found the solution:
i removed display: inline-block;
because i only got that from this http://www.dynamicdrive.com/forums/showthread.php?66277-border-only-around-text-not-full-container-width
i instead did:
width: 300px;
because the length of the text is 300px
and then margin: auto;
worked(it didn't work when i did display: inline-block;
.) now it the border doesn't
cover too much space and it's centered
thanks everyone that tried to help
I want the border to not take up so much unnecessary space, just cover the text.
So i used display: inline-block;
.
what it looks like with display: inline-block;
But it's not centered so i put margin-left: 550px;
and margin-right: 550px;
.
Now it's centered but it breaks when I resize the browser and it might be off-center on different resolution monitors. How do i make it like "1234"(the text under) which can resize itself?
image of when the browser is resized
Thank you in advance.