Jump to content

Centering pagination in bootstrap


tijs

Recommended Posts

Hello everybody,

I'm just new on this forum and I hope that I can learn from people and try to help other people here and share our experiences in web development!

I'm reasonably new in the programming world and I have already learned html and css and now i'm learning bootstrap but somethimes I have some problems and I don't fond solutions for them.

 

So my problem is in centering the .pagination in the bottom of the page.

I have tried to do it with setting the marge of the element like this:

 

<div class="row">			<nav style="marge:0 auto">				  <ul class="pagination pagination-lg">			    <li>			      <a href="#" aria-label="Previous">			        <span aria-hidden="true">«</span>			      </a>			    </li>			    <li><a href="#">1</a></li>			    <li><a href="#">2</a></li>			    <li><a href="#">3</a></li>			    <li><a href="#">4</a></li>			    <li><a href="#">5</a></li>			    <li>			      <a href="#" aria-label="Next">			        <span aria-hidden="true">»</span>			      </a>			    </li>			  </ul>			</nav>	</div>
But this don't work. Can please someone help me out?
Thanks a lot,
Tijs
Edited by tijs
Link to comment
Share on other sites

The property name is margin, not marge.

 

Setting the margins to auto will only work if the element has a defined width. If you're trying to center inline elements or inline-blocks then just setting text-align to center should work.

Link to comment
Share on other sites

Many thanks my friend it worked!

I was also wondering if you know how I can gain experience in programming html and css + bootstrap? Are there some advanced lessons or something? Because I'm really motivated to become better and better in programming!

Good evening !

Link to comment
Share on other sites

CSS isn't programming. It's actually unimaginably simple compared to programming.

 

There are two ways to learn and you can do both at the same time:

1. Go to college or university

2. Do research and think through problems.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...