Jump to content

[SOLVED] Centering Div Problem


chordsoflife

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.