Home >Web Front-end >HTML Tutorial >HTML left and right layout sample code sharing

HTML left and right layout sample code sharing

高洛峰
高洛峰Original
2017-03-08 15:41:313081browse

Everyone must be familiar with the form of left and right layout. There is a good example in this article. I hope it can help everyone better understand the concept of left and right layout.

css:
The code is as follows:

html,body{ margin:0px; padding:0px; height: 100%; } .headbg{ background: black; color: white; height:48px; } .userManagerAll{ height: 100%; width: 100%; } .leftside{ background: #E6E6E6; float: left; height: 100%; width: 200px; margin: 0px; overflow-y:auto; } .rightside{ background: white; height: 100%; width:100%; align:right; }


html

The code is as follows:

<p class="head"></p> 
<p class="All"> 
<p class="left side">1</p> 
<p class="right side">2</p> 
</p>


Click the text box and the text disappears

The code is as follows :

<input name="textfield" style="color:#CCC;" type="text" value="点击文字消失" size="12" onclick="value=&#39;&#39;;focus()" onblur="if(value==&#39;&#39;) value=&#39;点击文字消失;"/>


The above is the detailed content of HTML left and right layout sample code sharing. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn