Activity › Forums › Web Design (WordPress, Joomla, etc.) › CSS Background Properties
-
CSS Background Properties
Posted by Jacob Resendez on December 31, 2007 at 4:38 pmI have been searching online for any code sampling of CSS backgrounds such as this one:
http://www.bluestepstudio.comhow/what coding is used to keep the background fixed to the browser window?
Jacob Resendez replied 18 years, 7 months ago 2 Members · 4 Replies -
4 Replies
-
Abraham Chaffin
December 31, 2007 at 5:12 pmThis page is built using a body margin of 0 so there is no border to the page. The image you see is actually a SWF that is set to stretch 100% wide and 100% tall so it fills the entire page no matter what size the window is.
-
Jacob Resendez
December 31, 2007 at 5:18 pmthats what i figured. i tried putting a swf in my css backgroundbut it didnt work. here is a sample:
{background-image:url(file:///cpu/Users/me/Desktop/css/test.swf)
is this not the correct way to insert a swf?
-
Abraham Chaffin
December 31, 2007 at 5:24 pmYea – you can’t use a swf as a background image – because a swf isn’t an image. They might support this some day but not atm.
Using your browser view the source of the page with the swf file and you’ll see how they did it.
Here’s what you should see:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="100%"
HEIGHT="100%"
id="xmas" ALIGN="">
<PARAM NAME=movie VALUE="xmas.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED src="xmas.swf" quality=high bgcolor=#ffffff WIDTH="100%" HEIGHT="100%" NAME="xmas" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
-
Jacob Resendez
December 31, 2007 at 5:37 pmyeah thats exactly what i did. only problem is in my css sheet. heres an example:
body { background-image: url(https://www.mywebsite.com/css/terminal.jpg);
background-attachment: fixed; background-repeat: no-repeat}everytime i stretch the browser larger than my css backround image, my css background color is displayed. on the bluestepstudio site, their background image seems to grow or shrink when the browser is stretched.
Reply to this Discussion! Login or Sign Up