DEV Community

AKSH DESAI
AKSH DESAI

Posted on

CSS Min-Width & Max-Width Tutorial

Code

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    #first {
      border: 3px solid;
      min-width: 600px;
      max-width: 800px;
    }


    img {
      width: 100%;
    }
  </style>
</head>

<body>
  <h1> Yahoo Baba Css Min-Width and Max-Width</h1>

  <div id="first">

    <img src="/11/aksh.jpg" alt="">
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
  </div>
</body>

</html>
Enter fullscreen mode Exit fullscreen mode

Output
Output

Thank You.
You can follow us on:
Youtube
Instagram

Top comments (0)