HTML CSS examples for CSS Layout:Responsive Layout
make two columns in HTML responsiveness
<html> <head> <title>Lorem ipsum dolor sit a</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .logo:first-child<!-- w w w . j ava 2 s. com--> { background:red; } .logo:last-child { background:blue; } img { width:100%; } @media screen and (max-width: 640px) { .header { width:100%; } .logo { width:100%; } } </style> </head> <body> <table width="100%" cellspacing="0" cellpadding="0" border="0" style="background-color: #f3f3f3;"> <tbody> <tr> <td style="text-align: center; vertical-align: top;"> <!-- HEADER --> <table align="center" cellspacing="0" cellpadding="0" border="0" style="background-color: #ffffff; " class="header"> <tbody> <tr> <!-- Logo --> <td align="left" style="display: inline-block; padding: 5px;" class="logo"> <a href="#"> <img width="200px" border="0" src="https://www.java2s.com/style/demo/Opera.png" style="display: block;"> </a> </td> <!-- Logo --> <td align="right" style="display: inline-block; padding: 5px;" class="logo"> <a href="#"> <img width="200px" border="0" src="https://www.java2s.com/style/demo/Safari.png" style="display: block;"> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </body> </html>