CSS background image alignment

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

CSS background image alignment

Post by alex.barylski »

I am trying to get a image to align with the right top of a LI element:

Code: Select all

background-image: url('images/layout/tab_edge.gif');
  background-repeat: no-repeat;
  background-position: right, 0px;
Shouldn't this code work :cry:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

No quotes.

Are you sure the path is correct? If memory serves, it's relative to the CSS' location by default.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Tried both of those...nuttin :?

Meh not important...wasn't critical
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Lose the comma in background-position.

Or, alternatively

Code: Select all

background: url(images/layout/tab_edge.gif) no-repeat right top;
/*
is the same as
  background-image: url('images/layout/tab_edge.gif');
  background-repeat: no-repeat;
  background-position: right, 0px;
*/
Post Reply