CSS Question(s)

They have: 10 posts

Joined: Nov 2002

My friend and I were talking over a few beers and he mentioned a page that I did as an experiment. HERE It is (bar one table) done entirely with CSS. On the page there is a fixed background image. That was the topic. It started as a general inquiry and then developed into a brainstorm of ideas. One of the ideas that we came up with was to use a SWF image as a background like on the aforementioned page. Has anyone here tried something like that? Is it possible? I have not had the time to try it yet and thought that asking here might be a good thing.

What do you think?

somethines you can and sometimes
you can't.

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

...ummm what is the point of this site?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

You're asking if you can have a SWF file as a background image?
I'm not sure. I don't think I've ever seen a site do that.

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

... hmm i'm not sure u can do that either :S but prove me wrong hehe

Busy's picture

He has: 6,151 posts

Joined: May 2001

you could probably float it in a CSS background layer, but layers aren't fully supported so you'd be limited

nice layout, looks better in IE than Mozilla thou

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

I think a bg layer is the best option.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

You'll have issues as objects (Flash) need to have the z-index set, and it can be inconsistent. I've heard people asking about having drop-down menus that go over flash elements on a page, and it's always been problematic.

What I would recommend is setting up a demo page with any .swf you have kicking around. I'm pretty sure that .swf isn't supported as a background-image (only .gif, .jpg and .png).

Good luck, and let us see the results!

They have: 10 posts

Joined: Nov 2002

thanks for the responses... I will, once I find the time, do some test pages and let you all see the results no matter what they are.

It seems odd that there are limatations on what a background image can be. I know that it would have to be a "graphic" file but I thought that a FLA was one.

We'll see what happens.

somethines you can and sometimes
you can't.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

As popular as Flash is, .fla will not ever be accepted as a background image, and .swf is not part of the standard. It's a plug-in, and as such, should be in an object only.

Would it be reasonable to have .wmf as a background file? .psd? No. Same with .swf or .fla -- they are proprietary formats.

They have: 10 posts

Joined: Nov 2002

can you not make an object a background image using CSS?

What exactly are the rules with "plug-ins" ,"objects" and "background" images?

how about the Adobe format, SVG... is that the same?

somethines you can and sometimes
you can't.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

SVG is in the middle of being declared a standard (non-proprietary). I'm not totally up to speed on that. Perhaps there is more information on this at adobe.com on what's happening.

No, you can't make an object a background-image in the CSS. Object is an html element, so can be styled using CSS (positioning, especially), but you can't embed an object in the CSS as it doesn't work that way.

The rules? I'm not sure what rules you mean. A plug-in is a proprietary format that the user agrees to use. It's often embedded into the document using the element of HTML, unlike, say, an image, which has its own element, or background-image which is its own attribute (though now in the CSS, not in the HTML).

Is that helpful or confusing?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

http://search.adobe.com/cgi-bin/query?mss=simple&pg=q&what=web&fmt=.&where=www_search_main&superq=svg&index=AdobeCom&q=svg&x=37&y=7

Oodles of links and information!

http://www.adobe.com/svg/main.html

I don't know that you can use SVG for background-images, though, but it does look like it's coming along nicely. Totally viewable source. Nice!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.