Welcome to Dream.In.Code
Become an Expert!

Join 137,383 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,111 people online right now. Registration is fast and FREE... Join Now!




Buttons wont center

 
Reply to this topicStart new topic

Buttons wont center, cant center buttons under picture

Smurphy
13 Oct, 2008 - 02:16 PM
Post #1

New D.I.C Head
*

Joined: 7 Jul, 2008
Posts: 47



Thanked: 1 times
My Contributions
Hello again I know this is something stupid I am missing but hey brain farts happen. So I have these buttons that will not center under the picture I have, I included a screen shot of the problem hope that helps. Thank in advance for the help. biggrin.gif
CODE
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
#container div{
padding-left:50px
}
#navigation a:link, #navigation a:visited{
color:#fff;
background-image:url(button.jpg);
background-repeat:repeat-x;
background-position:center;
border:2px outset #000000;
vertical-align:middle;

}
#navigation a:hover, #navigation a:active{
color:#000;
background-image:url(buttonbc.jpg);
background-repeat:repeat-x;
border:2px outset #000000;
vertical-align:middle;
}
body{
background-image:url(offbookbg.jpg);
padding-top:15px;
padding-left:40px;
}
#navigation {
height:45px;
font-family:verdana,ariel;
}
#navigation ul{
margin:0px;
padding:0px;
list-style-type:none;
}
#navigation ul li{
display:inline;

}
#navigation ul li a{
text-decoration:none;
float:left;
margin:12px 0;
padding:15px;
text-align:center;
}
</style>
</head>
<body>
<div id="container" align="center">
<div id="header">
<Img  width="885" height="200" src="lightoff.jpg" />
</div>
<div id="navigation" align="center">
<ul>
<li><a href="#">History</a></li>
<li><a href="#">Season</a></li>
<li><a href="#">Celebration High</a></li>
</ul>
</div>
</div>
</body>
</html>

Attached Image

User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Buttons Wont Center
13 Oct, 2008 - 02:21 PM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,054



Thanked: 84 times
Dream Kudos: 1175
My Contributions
I believe your problem is this line:
CODE
#container div{
padding-left:50px
}


That is adding a 50 pixel pad to the left side of the banner image, which you don't have mimicked in your navigation menu. So either (A) remove the padding from the container (above) or (cool.gif add the padding to the navigation.

HTH
User is offlineProfile CardPM
+Quote Post

Smurphy
RE: Buttons Wont Center
13 Oct, 2008 - 02:52 PM
Post #3

New D.I.C Head
*

Joined: 7 Jul, 2008
Posts: 47



Thanked: 1 times
My Contributions
Haha thank you, see I knew it was something stupid I missed icon_up.gif . I just needed a little bit more padding but now it is centered.
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Buttons Wont Center
13 Oct, 2008 - 02:55 PM
Post #4

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,054



Thanked: 84 times
Dream Kudos: 1175
My Contributions
Lol no problem smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 01:56AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month