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? 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 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* Link to comment https://forums.phpfreaks.com/topic/104469-solved-centering-div-problem/#findComment-534844 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.