Tuesday, 15 January 2013

html - Social Media icons, not centering inside of div -



html - Social Media icons, not centering inside of div -

not sure why, can't icons centered on page without using padding-left:130px;

which isn't ideal of course of study because icons don't center when re-size browser window. maybe need more coffee, utilize stacker help morning!

http://towerdive.net/

html

<div id="center2"> <div id="social_icons"> <p> involvement in our blog! can find here, subscribe our newsletter: </p> <ul> <li id="facebook"> <a href="https://www.facebook.com/pages/towerdive/497721103607131" title="like on facebook"><img src="img/icon_facebook.png" alt="facebook"/></a> </li> <li id="twitter"> <a href="https://twitter.com/towerdivedotnet" title="follow on twitter"><img src="img/icon_twitter.png" alt="twitter"/></a> </li> <li id="newsletter"> <a href="http://eepurl.com/uy5m9" title="subscribe our newsletter"><img src="img/icon_newsletter.png" alt="newsletter"/></a> </li> </ul> </div> </div>

css

#center2 { width: 100%; } #social_icons { margin: 0 auto; width: 400px; height: 250px; text-align: center; } #social_icons p { color: #e3cda4; } #social_icons ul { margin: 0 auto; list-style: none; text-align: center; } #social_icons ul li { float: left; padding-right: 10px; }

let me know if guys need total html or css!

you can utilize display:inline-block this. write this:

#social_icons ul li { display: inline-block; *display:inline;/* ie7*/ *zoom:1;/* ie7*/ vertical-align:top; padding-right: 10px; }

html css centering

No comments:

Post a Comment