1
lordliquid
Center a no repeat background banner.
  • 2006/3/8 18:16

  • lordliquid

  • Just popping in

  • Posts: 27

  • Since: 2005/9/22


Here is my code:

td.bkg {
background-image: url(images/cellpic_bkg.jpg);
height: 120px;
vertical-align: bottom;
background-repeat: no-repeat;
padding:5px;
}


here is my site :
http://www.lineage2cheats.net

what do I need to add to the code to make it align in the center horizontally.. Thanks in advance!

2
TottoBG
Re: Center a no repeat background banner.
  • 2006/3/8 19:03

  • TottoBG

  • Not too shy to talk

  • Posts: 111

  • Since: 2005/8/18


Not sure if 'vertical-align: bottom;' will work there. But try
Quote:
background-position: bottom center;

The first property value ('bottom') is for vertical alignment and the second one ('center') is for horizontal alignment.

3
lordliquid
Re: Center a no repeat background banner.
  • 2006/3/8 20:00

  • lordliquid

  • Just popping in

  • Posts: 27

  • Since: 2005/9/22


That worked thanks!

I replaced:

le="color: #000000"><?php vertical-align: bottom;


with:

le="color: #000000"><?php background-position: bottom center;


Like so:

le="color: #000000"><?php td.bkg { background-image: url(images/cellpic_bkg.jpg); height: 120px; background-position: bottom center; background-repeat: no-repeat; padding:5px; }

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!