Jump to content

Unable to center text within a list


Recommended Posts

Hello there,

 

I was hoping someone could help me shed some light.

 

I seem to unable to centre the text and Orange button on the page http://absolutehappinessbook.review ... but only in all the instances below the heading "Chapters and Contents".

 

It looks mostly centred; however, if you view it on a small iPhone then you can see that it is skewed more to the right, and I am looking for pixel perfection centering.

 

If anyone can see the error of my ways I would greatly appreciate.

 

Kind regards

Edited by uworlds
Link to post
Share on other sites

That's because the <li> elements have 16 pixels of padding on the left and only two pixels of padding on the right. You'll need to set some CSS to give equal padding to both sides of the list items containing the content you want centered.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...