css Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/css/ Production Grade Technical Solutions | Data Encryption and Public Cloud Expert Thu, 04 Aug 2016 01:16:53 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://www.anujvarma.com/wp-content/uploads/anujtech.png css Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/css/ 32 32 Auto scale image to fill entire web page https://www.anujvarma.com/auto-scale-image-to-fill-entire-web-page/ https://www.anujvarma.com/auto-scale-image-to-fill-entire-web-page/#respond Thu, 04 Aug 2016 01:16:52 +0000 http://www.anujvarma.com/?p=4304 If you have a page size that may not be fixed – but would still like your image (background image) to automatically fill in the entire page, here is a […]

The post Auto scale image to fill entire web page appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
If you have a page size that may not be fixed – but would still like your image (background image) to automatically fill in the entire page, here is a tip.

<div style='position:absolute;z-index:0;left:0;top:0;width:100%;height:100%'>
  <img src='mybackground.jpg' style='width:100%;height:100%' alt='[]' />
</div>
This enables the DIV to resize according to the page size (since div is set to 100%). 
Anything inside the div gets scaled along with the DIV.

The post Auto scale image to fill entire web page appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
https://www.anujvarma.com/auto-scale-image-to-fill-entire-web-page/feed/ 0