html - How can I position list in <div>? -
i have <div>
, has image in background. want put list div how can position in
http://i.stack.imgur.com/vwmb2.png
you can see in above picture have background , list not able position it.
my code
<div id="footer"> <div id="footer-content"> <div id="footer-list"> <ul> <li><a href="#home">home</a></li> <li><a href="#news">blog</a></li> <li><a href="#contact">about ff</a></li> <li><a href="#about">faq</a></li> <li><a href="#about">how play</a></li> <li><a href="#about">terms of use</a></li> <li><a href="#about">privacy policy</a></li> </ul> </div> </div> </div>
css--
#footer-list ul { list-style-type: none; margin: 0; padding: 0; margin-left: 500px; margin-top: 100px; } #footer { background-image: url(/img/footer.png); height: 140px; width: 1820px; background-repeat: no-repeat; left:0px; bottom: 0px; }
the problem css when giving 'margin-top:100px' ul goes down background pic goes down.
so how can position list in div?
i think want. when u use <ul>
u can't use <div>
inside that. checkout this
#footer-content ul { list-style-type: none; margin: 0; padding: 0; margin-left: 500px; } #footer-content ul li { display: inline; } #footer { background-image: url('http://i.stack.imgur.com/vwmb2.png'); height: 140px; width: 1820px; background-size: 1820px 140px; background-repeat: no-repeat; left:0px; bottom: 0px; padding-top:50px; }
<div id="footer"> <div id="footer-content"> <ul> <li><a href="#home">home</a></li> <li><a href="#news">blog</a></li> <li><a href="#contact">about ff</a></li> <li><a href="#about">faq</a></li> <li><a href="#about">how play</a></li> <li><a href="#about">terms of use</a></li> <li><a href="#about">privacy policy</a></li> </ul> </div> </div>
Comments
Post a Comment