-2

Edit2: Sorry, I messed up this whole question. I am centering an ul, and it'll be slightly off to the right. If I do the same exact thing using divs, it'll center correctly.

Here I use div: http://cssdeck.com/labs/rt6p03qe Here I use ul: http://cssdeck.com/labs/g4iyhnqb

As you can see, they are slightly offset, even though the code is the same for both.

Mordi
  • 35
  • 5
  • http://cssdeck.com/labs/rt6p03qe and there are **four** boxes. – Paulie_D May 02 '15 at 15:20
  • They are not slightly off to the right, they are all the way to the left. I tried it in IE, Firefox and Chrome. There is nothing in the code that would center the boxes. – Guffa May 02 '15 at 15:22
  • Centering is pretty well covered here - http://stackoverflow.com/questions/114543/horizontally-center-a-div-in-a-div?rq=1 – Paulie_D May 02 '15 at 15:30

1 Answers1

0

UL's have built in padding. Set your UL's to padding: 0 and it'll not be offset.

Quintile
  • 335
  • 2
  • 6