chordsoflife Posted May 6, 2008 Share Posted May 6, 2008 This is killing me: <div style="float: left; width: 100%; text-align: center; margin-bottom: 20px;"> <div style="float: left; width: 100%; margin-left: auto; margin-right: auto;"> <div class="skill"><a href="">Website<br />Design</a></div> <div class="skill"><a href="">Graphic<br />Design</a></div> <div class="skill"><a href="">Media<br />Tracking</a></div> </div> </div> Why is this not centering the three divs inside? Quote Link to comment https://forums.phpfreaks.com/topic/104469-solved-centering-div-problem/ Share on other sites More sharing options...
TheFilmGod Posted May 7, 2008 Share Posted May 7, 2008 This is killing me: <div style="float: left; width: 100%; text-align: center; margin-bottom: 20px;"> <div style="float: left; width: 100%; margin-left: auto; margin-right: auto;"> <div class="skill"><a href="">Website<br />Design</a></div> <div class="skill"><a href="">Graphic<br />Design</a></div> <div class="skill"><a href="">Media<br />Tracking</a></div> </div> </div> Why is this not centering the three divs inside? Maybe because you specified "float: left".??? ? Take the float: left OUT Quote Link to comment https://forums.phpfreaks.com/topic/104469-solved-centering-div-problem/#findComment-534836 Share on other sites More sharing options...
chordsoflife Posted May 7, 2008 Author Share Posted May 7, 2008 Right. *smacks head* Quote Link to comment https://forums.phpfreaks.com/topic/104469-solved-centering-div-problem/#findComment-534844 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.