In Myspace, what's the html code to have a background image stretch the entire size of the screen?
Public Comments
- www.imageshack.us brows your image you want...play with the sizes to see what fits and use direct link to image...or one that works good luck
- <div style="width: 100%; height: 100%; left: 0px; top: 0px; position: absolute; z-index: 0;"> <img src="animage.jpg" style="width: 100%; height: 100%;"> </div> place the codes above as the first set of codes in your html script
- in the (open) body tag add the "style" attribute: <body style="background-image: url(yourImageSource.jpg); background-repeat: repeat;"> if you want the image to be fixed: <body style="background-image: url(yourImageSource.jpg); background-repeat: repeat; background-attachment: fixed;"> otherwise if you mean how to fit the image to screen size (which appears to me highly discouraged for accessibility issues) follow this esample: <html> <head> <style type="text/css"> body {margin:0px;} #bg_image { width: 100%; height: 100%; left: 0px; top: 0px; position: absolute; z-index: 0; } #contents { z-index: 1; position: absolute; } </style> </head> <body> <!-- this creates the background image --> <div id="bg_image"> <img src="yourImageSource.jpg" style="width: 100%; height: 100%;"> </div> <!-- this puts the contents of the page ontop of the background image --> <div id="contents"> You can put whatever you want here </div> </body> </html> i created this page "For Screening Purpose Only" to show you the final result ->http://portofrancoblog.altervista.org/archive_file/tryme.html feel free to contact me if you need
- that's impossible you have to load the image into a paint program like photos shop and resize the image the with of the screen. it will have to be 800x600, 1024x768, or 1280x1024 if someone comes to your site using a different screen resolution than you then it will not look good unless you use style sheets to center it. another way to resize it is upload it here http://www.resize2mail.com/advanced.php
Powered by Yahoo! Answers