Search
 
SCRIPT & CODE EXAMPLE
 

CSS

how to make background image responsive in css

/*width of image is auto adjusted by 70% of its container width.*/
img {
width: 70%;
}
/*if your image has a 50% width for any kind of screen. 
But when you want to make it full-size for mobile devices you need to get help from media queries:*/
/*using media Queries */
@media only screen and (max-width: 480px) {
img {
width: 100%;
}
}
Comment

PREVIOUS NEXT
Code Example
Css :: css resize image 
Css :: media screen hp 
Css :: css selector not empty input 
Css :: scss import class from another file 
Css :: mysqli load result into array 
Css :: font face 
Css :: how to put mulitple conditions in media query 
Css :: live sass compiler settings 
Css :: what are the types of positioning in css 
Css :: css no purple links 
Css :: &:disabled not working sass 
Css :: make something slowly invisible css 
Css :: html css background linear-gradient 
Css :: removing space between words css 
Css :: css delay between animation iterations 
Css :: flexbox properties css 
Css :: select last tr in table css 
Css :: style scrollbar 
Css :: css video background 
Css :: css image hover 
Css :: pagination in css 
Css :: grid repeat css 
Css :: make the first item at the very top of the screen 
Css :: brightness css 
Css :: center image in css 
Css :: css grid auto row 
Css :: image to fill container size 
Css :: input of type radio css 
Css :: zoom background image css 
Css :: simple font-face mixin scss 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =