WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > CSS > center <ul> and <p> in <div> container

Reply
  Thread Tools Display Modes
Old 17th November 10, 03:44 PM   #1
mmariadas
WLC Member
 
Join Date: Aug 2010
Posts: 2
Default center <ul> and <p> in <div> container

Hello

I need to center the footer menu and a text, but I can't figure out how.

This is the HTML part.
HTML Code:
<div id="footer" class="clear"> 
<ul><li><a href="index.php?id=12">Terms of Use</a></li><li><a href="index.php?id=13">Disclaimer</a></li><li><a href="index.php?id=14">Privacy Policy</a></li></ul>
<p class="bold">This site does not provide medical advice, diagnosis or treatment.</p>
</div> 
This the CSS part (which is not working, as I want it to).
Code:
/* FOOTER STYLE */
#footer{
	height: 29px;
	border-top: 1px solid #cdcbc8;
}
#footer ul{
	list-style-type: none;
	float: left;
}
#footer li{
	display: inline;
	padding: 0 10px;
}
#footer a,
#footer span{
	font-size: 12px;
	line-height: 29px;
	color: #696867;
}
#footer p{
        font-size: 12px;
        font-weight: bold;
        color: #696867;
        text-align: center;
}
Can anyone pls give me a hint.

Thx Manuel
mmariadas is offline   Reply With Quote
Old 17th November 10, 09:20 PM   #2
rkrause
WLC Mod
 
Join Date: Sep 2009
Posts: 893
Default Re: center <ul> and <p> in <div> container

give it a width and a margin of 0px auto;

Ryan
rkrause is offline   Reply With Quote
Old 18th November 10, 06:01 AM   #3
mmariadas
WLC Member
 
Join Date: Aug 2010
Posts: 2
Default Re: center <ul> and <p> in <div> container

Quote:
Originally Posted by rkrause View Post
give it a width and a margin of 0px auto;

Ryan
Hey Ryan

thanks for your answer. Which one should I give these settings? The

#footer or the
#footer ul or ...

I tried #footer and #footer ul because they made sense to me as they are wrapping the whole thing.

Manuel
mmariadas is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:18 AM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.