Public Voice Network
- blog 3124431244
- FMT 120508 3030
- Favorite brands 3838
- QBN MOLESKINE PROJECT 286286
- Guitar 1515
- Art Fair
- Pic of the Day 1050210502
- Favorite Beer? 133133
- flash question 99
- EC: The Grid System 1717
- New Site Feedback 2222
- new acoustic pickup 88
- Font id 55
- Canadian Politics con'… 6565
- God is quite busy 8686
- SEO "Specialists&quo…
- Kinetic Typography 2222
- Aquarium owners 77
- For TheBlueOne 77
- Typeface 88
- Copy Font 88
- fastfood 2020
- Ajax 1111
- menu btn not working 88
html css background script 1111 Responses
Last post: 1 month, 4 weeks ago | Thread started: Oct 6, 08, 3:04 a.m.
- db_gd
http://www.crushed.co.uk/ seems to have it sussed.


- Dog-earOct 6, 08, 5 a.m. – Permalink
- jamble
Crushed uses an image in the html, not the css. It's perfectly do-able if you put the image in the HTML as you can just apply a width and height of 100% in the css to an img class but you can't do it in CSS using a background.
An example of how it's done is here: http://www.cssplay.co.uk/layouts…


- Dog-earOct 6, 08, 5:12 a.m. – Permalink
- Nathan_Adams
I had a similar technique to Crushed going on a site I had in development for a client, but ultimately got vetoed because my boss insisted on viewing it on one of those retarded micro laptops, that had a semi normal screen width, but pratically no vertical height - hence stretching the background in a way you'd rarely see.
I do remember after all that seeing a script that kept it all in proportion, whilst still filling the browser window. I'll see if I can dig it up.

- Dog-earOct 6, 08, 5:29 a.m. – Permalink
- Nathan_Adams
Have a look at this:
http://css-tricks.com/how-to-res…

- Dog-earOct 6, 08, 5:41 a.m. – Permalink
- neverblink
that last one doesn't really work.. they need to switch from width = 100% to height = 100% when the viewport's width is smaller than the height.


- Dog-earOct 6, 08, 6:17 a.m. – Permalink
- pylon
Agreed, neverblink.
I'll likely need to be done via javascript or similar as that's a calculation that I don't believe can be done via CSS. There has to be logic built in that takes into account window height and window width and then scales the image along the appropriate axis.

- Dog-earOct 6, 08, 6:46 a.m. – Permalink

