1
philfire
Fix header img width and centre
  • 2008/7/30 11:55

  • philfire

  • Just popping in

  • Posts: 25

  • Since: 2008/7/13


I'm using a flexible theme that uses tiles.

I want to fix and centre a header image in the css.

Currently the image is called tile.gif and the relevant parts of the css that I can identify look like this ...
td.banner{          
text-alignright;          
padding:5px;          
background-imageurl('images/tile.gif');          
height70px;


and this
td.header {                  
text-alignleft;          
vertical-alignmiddle;          
background-imageurl('images/tile.gif');          
height70px;


Any help or comments much appreciated, thank you.

2
trspice
Re: Fix header img width and centre
  • 2008/7/31 4:44

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


background-image: url('images/tile.gif') center fixed;

If it needs to repeat in a specific direction then remove fixed and add
repeat-x
for horizontal only
repeat-y for vertical only
There's nothing but science....
The Reggae Album

3
philfire
Re: Fix header img width and centre
  • 2008/7/31 20:28

  • philfire

  • Just popping in

  • Posts: 25

  • Since: 2008/7/13


Thanks for that, unfortunately it hasn't worked.

when I altered
background-imageurl('images/tile.gif');


in both or either case I get, in one case, the image tiling as it was, in the rest I just get noimage at all.
I tried altering the height and width to the actual image size, but that didn't work either.

I'm still having this problem.

4
Bleekk
Re: Fix header img width and centre
  • 2008/8/4 15:04

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


did you try to add margin:auto;

5
philfire
Re: Fix header img width and centre
  • 2008/8/8 17:36

  • philfire

  • Just popping in

  • Posts: 25

  • Since: 2008/7/13


Thanks bleekk, tried that, no joy.
I've done some reading and am just realising what an irritating issue this is since it wasn't included in the inception of css.

6
aph3x
Re: Fix header img width and centre
  • 2008/8/8 19:21

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


try this...

background-imageurl('images/yourimage.gif');background-repeatno-repeatbackground-positioncenter;


you will/might need to provide it with a width value as it might get browsers confused and not display the image at all...if the background declaration doesn't work try a
margin-leftautomargin-rightauto


...it would have been lot faster to get an answer if you would have provided the name of the theme, anyway..hope that helps :)
Everything I'm not made me everything I am
The Themes

Login

Who's Online

176 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 176


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits