TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 346
  • Total: 346

CSS Help : Centering Backdrop

Started by jjnova, January 25, 2008, 06:31:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jjnova

I apologize if this has been asked before, I couldn't find it when performing a search.

What I would like to do, is have two images as a backdrop. One that has a "beta release" ribbon I can align all the way to the left, as well as a typical banner that is centered. For instance, at http://gamecootie.com , I would like to have the "beta release" portion to the left (like it is right now), and the "Video Game Jerks" banner centered. Below is what my style.css looks like,


#backdrop
{
   height: 98px;
   background: url(images/backdrop.jpg) no-repeat white;
   margin-left:auto;
   margin-right:auto;
   border-top: solid 1px #808080;
}


I would of expected that to center the image, but alas, it does not. Any help whatsoever would be appreciative, even if I can only put a single image there and have it centered.

Zetan

Try:    background-position: center;

jjnova

That worked perfectly. Thank you very much.

G6Cad

background: url(images/backdrop.jpg) no-repeat white;

Should have #white; and not just white;

IchBin

Actually the # sign is for the hex numbers in colors. So using "white" and not "#white" is the way its supposed to be.

This website is proudly hosted on Crocweb Cloud Website Hosting.