how can i align a navbar to display center align with css? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

how can i align a navbar to display center align with css?

5th Jul 2017, 2:08 AM
Mbumetih Yanick
Mbumetih Yanick - avatar
2 Respostas
+ 2
@Calvin answer is right if you apply its css rule to your navbar container and your navbar if of inline type (not block), or apply it to the navbar element to center its inilined content... You can change the behaviour of a block level element by changing its 'display' css property to 'inline' or 'inline-block'... Other ways for centering are available: provide your code (or better a link to your code playground or elsewhere online IDE) to get accurate answer best efficient related to your code context ^^
5th Jul 2017, 4:05 AM
visph
visph - avatar
0
text-align:center;
5th Jul 2017, 2:26 AM
CalviÕ²
CalviÕ² - avatar