WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > CSS > [SOLVED] My li won't align correctly under my title

Reply
  Thread Tools Display Modes
Old 23rd April 15, 05:57 PM   #1
ashlaya
WLC Member
 
Join Date: Apr 2015
Posts: 2
Default My li won't align correctly under my title

Hello,
I have a personal website: http://justletme.be/
You see, the navbar (a bunch of li inside a div) won't align properly under my title.
I tried changing different things, even things that seemed unrelated, tried making the .navbar inherit the width from the #header (it changed nothing, but I tried making it inherit the height instead and it looked better that way so I kept it), changed text-align, position, etc. but I can't make it work.
I thought it was due to the #header being parent to the .navbar and tried moving the div outside to check, but it still didn't align properly.
Here is the relevant code:
Code:
#header {
background-color: #FF877E;
color: #FFDA50;
border: 5px;
border-radius: 5px;
height: auto;
width: auto;
position: center;
float: both;
padding: 10px 10px 10px 10px;
text-align: center;
}

#header a {
color: #FFDA50;
text-decoration: none;
}

.navbar {
height: inherit;
width: auto;
margin-bottom: 10px;
text-align: center;
}

.navbar a:link {
color: #FFDA73;
text-decoration: none;
font-size: 15px;
font-weight: bold;
}

.navbar li {
list-style: none;
display: inline;
padding-right: 10px;
}
Yes this is maybe a bit messy. If anybody has any idea regarding what I did wrong, I'd be thankful. Otherwise, have a good day and thanks for your time
ashlaya is offline   Reply With Quote
Old 24th April 15, 01:22 AM   #2
Phreaddee
WLC Lover
 
Phreaddee's Avatar
 
Join Date: Oct 2010
Location: Newcastle, NSW, Australia
Posts: 768
Default Re: My li won't align correctly under my title

Add
.navbar ul {padding:0;}

and change
.navbar ul li {padding:0 5px;}
Phreaddee is offline   Reply With Quote
Old 24th April 15, 10:12 AM   #3
ashlaya
WLC Member
 
Join Date: Apr 2015
Posts: 2
Default Re: My li won't align correctly under my title

It's working, thanks a lot! I'll make my thread solved.
ashlaya 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 02:02 PM.



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.