Adding background image to div using CSS

You need to add a width and a height of the background image for it to display properly. For instance, .header-shadow{ background-image: url(‘../images/header-shade.jpg’); width: XXpx; height: XXpx; } As you mentioned that you are using it as a shadow, you can remove the width and add a background-repeat (either vertically or horizontally if required). For … Read more

Symfony2 – Assetic – load images in CSS

use the cssrewrite filter from Assetic bundle In config.yml: assetic: debug: %kernel.debug% use_controller: false filters: cssrewrite: ~ And then call your stylesheets like this: {% stylesheets ‘bundles/cmtcore/css/*’ filter=”cssrewrite” %} <link rel=”stylesheet” type=”text/css” media=”screen” href=”https://stackoverflow.com/questions/7044631/{{ asset_url }}” /> {% endstylesheets %} Oh and don’t forget to use php app/console assetic:dump

Rails: How to set a background image in rails from css?

In your CSS: background-image: url(background.jpg); or background-image: url(/assets/background.jpg); In environments/production.rb: # Disable Rails’s static asset server (Apache or nginx will already do this) config.serve_static_assets = false # Compress JavaScripts and CSS config.assets.compress = true # Don’t fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false # Generate digests for assets URLs … Read more

Disable antialising when scaling images [duplicate]

Try this, it’s a fix for removing it in all browsers. img { image-rendering: optimizeSpeed; /* STOP SMOOTHING, GIVE ME SPEED */ image-rendering: -moz-crisp-edges; /* Firefox */ image-rendering: -o-crisp-edges; /* Opera */ image-rendering: -webkit-optimize-contrast; /* Chrome (and eventually Safari) */ image-rendering: pixelated; /* Universal support since 2021 */ image-rendering: optimize-contrast; /* CSS3 Proposed */ -ms-interpolation-mode: … Read more

background-size: cover not working on iOS

This happens, particularly on iOS, when you have background-attachment:fixed. On mobile, I usually put background-attachment:scroll inside of a @media query. As @RyanKimber pointed out, fixed attached images use the whole <body> size. On mobile this can get really tall which blows your image out. Setting the attachment back to scroll allows your cover image to … Read more

How to include the background-cover value in the shorthand background property?

According to the W3 and MDN, there needs to be a slash separating the backgound-size from the background-position: W3C example: p { background: url(“chess.png”) 40% / 10em gray round fixed border-box; } MDN: This property must be specified after background-position, separated with the “https://stackoverflow.com/” character. Opera also has some information on the background shorthand: http://dev.opera.com/static/dstorey/backgrounds/background-shorthand.html

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)