Page Widget How to - Disable vertical border on when website is resized for mobile with @media








Question

We would like to know how to disable vertical border on when website is resized for mobile with @media.

Answer


<!DOCTYPE html>
<html>
<head>
<style>
h1:after {<!--from w w w .  j a  v  a 2s .  c o m-->
  content: ' is larger than 740px';
  color: red;
}

@media screen and (max-width: 740px) {
  h1:after {
    content: ' is less than 740px';
    color: green;
  }
}
</style>
</head>
<body>
  <h1>This</h1>
</body>
</html>

The code above is rendered as follows: