CSS background attribute for TD in FF

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

CSS background attribute for TD in FF

Post by kendall »

Hi guys,

I'm using the below css attribute

Code: Select all

.topleft{
	background: url(images/top-left-corner.gif) fixed no-repeat top left; 

}
to make round corners for my tables. However for some reason...it displays only in IE but not FireFox. Can anyone give me some insight as to what is going on.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Could be because you've skipped the background colour and swapped the repeat and attachment attributes.

Code: Select all

.topleft{
        background: transparent url('images/top-left-corner.gif') no-repeat fixed top left;

} 
Last edited by jayshields on Fri Jun 01, 2007 7:12 am, edited 2 times in total.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Probably because you're using tables. That'd work fine in a regular block element.
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

superdezign wrote:Probably because you're using tables. That'd work fine in a regular block element.
thanks...wierd something like that would not work on of all browsers FF
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Yeah, true.
However, Firefox doesn't support some things that IE does, just like IE doesn't support some (a lot of) things that FF does.

As long as one is owned by Microsoft and one is not, their bound to be at ends.


But yea, if you get Firebug, then you can assign the individual attributes and it will collapse them into one for you.

i.e.
In CSS:

Code: Select all

background-color: rgb(0, 0, 0);
background-image: url(http://somewhere.com/someimage.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top center;
In Firebug:

Code: Select all

background: #000000 url(http://somewhere.com/someimage.jpg) no-repeat fixed center top;
I'm not sure why Firebug seems to switch the vertical and horizontal alignment, but it does every time I look at it.
Last edited by superdezign on Fri Jun 01, 2007 12:22 pm, edited 1 time in total.
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

any alternatives?

im not a CSS person but i have been playing around with "positions" and "top"...
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Alternatives to what?

If you mean the collapsed background property, the best thing to do is define each one separately.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Actually I don't think fixed is supported by IE.
Post Reply