View Full Version : Help - need to center banner
momof3ms
Mar-12-2009, 07:34 PM
I am trying to post a banner on my site, but everytime I put the code in, it is always off to the left side. Any suggestions???
Allen
Mar-12-2009, 07:41 PM
I am trying to post a banner on my site, but everytime I put the code in, it is always off to the left side. Any suggestions???
Got a link?
momof3ms
Mar-12-2009, 07:50 PM
Got a link?
Sure...now it's not even showing up!
Here is the link: http://www.kyliedavisphotography.com
Here is the code I have entered:
my_banner {
width: 750px;
height: 100px;
margin: 0 auto;
background: url(http://kyliedavisphotography.smugmug.com/photos/489911678_imAWK-L-1.jpg) no-repeat;
}
HELP...PLEASE!
Allen
Mar-12-2009, 07:57 PM
Sure...now it's not even showing up!
Here is the link: http://www.kyliedavisphotography.com
Here is the code I have entered:
my_banner {
width: 750px;
height: 100px;
margin: 0 auto;
background: url(http://kyliedavisphotography.smugmug.com/photos/489911678_imAWK-L-1.jpg) no-repeat;
}
HELP...PLEASE!
You are missing the # in front. Also put in the actual banner sizes.
#my_banner {
width: 800px;
height: 160px;
margin: 0 auto;
background: url(http://kyliedavisphotography.smugmug.com/photos/489911678_imAWK-L-1.jpg) no-repeat;
}
momof3ms
Mar-12-2009, 08:04 PM
Sure...now it's not even showing up!
Here is the link: http://www.kyliedavisphotography.com
Here is the code I have entered:
my_banner {
width: 750px;
height: 100px;
margin: 0 auto;
background: url(http://kyliedavisphotography.smugmug.com/photos/489911678_imAWK-L-1.jpg) no-repeat;
}
HELP...PLEASE!
OK, I think I figured it out, but it's still a little off-center. What do you think??
momof3ms
Mar-12-2009, 08:05 PM
OK, I think I figured it out, but it's still a little off-center. What do you think??
Thanks SO much for the help, by the way!!
Allen
Mar-12-2009, 08:11 PM
OK, I think I figured it out, but it's still a little off-center. What do you think??
Change back to the actually banner size and add bottom margin 20px or so
to space nav down. Change both the padding and margin in navcontainer
and all will center.
#my_banner {
width: 800px;
height: 160px;
margin: 0 auto 20px; /* top right/left bottom */
background: url(http://kyliedavisphotography.smugmug.com/photos/489911678_imAWK-L-1.jpg) no-repeat;
}
#navcontainer ul {
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}
momof3ms
Mar-12-2009, 08:25 PM
Change back to the actually banner size and add bottom margin 20px or so
to space nav down. Change both the padding and margin in navcontainer
and all will center.
#my_banner {
width: 800px;
height: 160px;
margin: 0 auto 20px; /* top right/left bottom */
background: url(http://kyliedavisphotography.smugmug.com/photos/489911678_imAWK-L-1.jpg) no-repeat;
}
#navcontainer ul {
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}
It worked great! thanks SO much for the late-night help!
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.