- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Sounds like a job for flexbox and the justify-content property https://css-tricks.com/snippets/css/a-guide-to-flexbox/
First of all, take off width of link inside li (you dont need to define it if you use flexbox), and as @Beverleyh said, put flexbox property with justify content alignment on menu container.
@conver2020 Please take the advice from the good people above and use flexbox (and shy away from ugly old-school hacks like `display: table-cell): flexbox was made to solve the layout of these kind of 2-dimensional (ui-)patterns.
If you make a reduced test-case on Codepen we can help you with problems you may run in to. Personally I use flexbox-playgrounds like this one as an interactive visual tool to get to the right syntax for the thing at hand: it may help you too.
@Atelierbram. I would like to create a test case on Codepen, but Codepan seems to have only HTML, CSS, and JS windows while I need to use some php codes to re-create my homepage there. I wonder how I can do it.
One can paste (parts of the) HTML-output into Codepen like can be seen if you do a “view source”. The usual shortcut for view-source is CTRL-U
while having focus in the webpage. Alternatively one can paste view-source:URL
– here view-source:http://www.secularvoices.net/
in the browsers address-bar and hit Enter
.
When you want to uncompress the minified HTML, search for a tool like “Uncompress HTML Code”: “uncompress html code” site: textfixer.com