Yahoo India Web Search

Search results

  1. 100% 100% does not keep the aspect ratio of the original image. ‘cover’ scales the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area.

  2. Apr 15, 2010 · This would be much easier to center than a background image on the body. Other than that try: background-position: 0 100px;/*use a pixel value that will center it*/ Or I think you can use 50% if you have set your body min-height to 100%. background-repeat:no-repeat; background-position: center center;

  3. Jan 14, 2015 · background-size: cover. One common use case of background-size: cover is in a full-screen layout where the background image is rich in detail, such as a photo, and you want to feature this image prominently, albeit as a background as opposed to the main content.

  4. I need to know how to get the background image to not be blurry when text is over it in CSS as it spoils the look of my website if it's blurry. My CSS is: background: #ff0000 url(img/rain.jpg) top center repeat-y; background-size: 100%; But when I load it up where there is text that line goes blurry and I don't want it to so how do I do this?

  5. (1) The original question was about scaling based on a browser window size. (2) Elements like div get their own height from their own content, or take available space in a flexbox model.

  6. I have seen this question a lot both on SO and the Web. But none of them has been what I am looking for. How do I add a color-overlay to a background image using CSS only? Example HTML: <div ...

  7. I specify my background inside of body in my css style sheet, but the page just displays a blank white ...

  8. Dec 17, 2008 · For modern browsers, you can accomplish this by using background-size: body {. background-image: url(bg.jpg); background-size: cover; } cover means stretching the image either vertically or horizontally so it never tiles/repeats. That would work for Safari 3 (or later), Chrome, Opera 10+, Firefox 3.6+, and Internet Explorer 9 (or later).

  9. Mar 23, 2010 · See notes for stacking images only IE < 9 below. Line 1 sets a flat background color. Line 2 sets the background image fallback. The final line sets a background image and gradient for browsers that can handle them. Line 3 is for all relatively modern browsers. Nearly all current browsers have support for multiple background images and css ...

  10. Jun 15, 2015 · I am trying to set a background-image to stretch to the full extent of a &lt;div&gt;'s width and height. The &lt;div&gt; will be of variable size, so I am using background-size: cover; background:...