alexalferink
New Coder
Hello, can anyone help me to get the images 100% width and scale proportionally along the device width. In my code, this doesn't seem to work:
[CODE title="style="width:100%;""]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<picture>
<source media="(min-width: 900px)" srcset="img/header1.jpg"; style="width:100%;">
<source media="(min-width: 480px)" srcset="img/header2.jpg"; style="width:100%;">
<img src="img/header1" alt="IfItDoesntMatchAnyMedia">
</picture>
</body>
</html>[/CODE]
[CODE title="style="width:100%;""]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<picture>
<source media="(min-width: 900px)" srcset="img/header1.jpg"; style="width:100%;">
<source media="(min-width: 480px)" srcset="img/header2.jpg"; style="width:100%;">
<img src="img/header1" alt="IfItDoesntMatchAnyMedia">
</picture>
</body>
</html>[/CODE]