PSD transduction converted to DIV+CSS format

Source: Internet
Author: User
Tags set background
<span id="Label3"></p><p><p>First put all the tag co-located inside and outside the margin to 0, in fact, there is another way is based on the body, the HTML tag used in the reset to 0</p></p><p><p><strong>PSD to div CSS page cut diagram example</strong></p></p><p><p></p></p><p><p>The first Step: first put all the tag co-located inside and outside the margin to 0, in fact, there is another way is based on the body inside the HTML tag used to reset to 0. you can also reset to 0 by using * and then resetting it based on the tag used in the Body. such as: we use the body tag, div, P then our selector will be written body,div,p. no need to write *.<br><br></p></p><span style="text-decoration: underline;"><span style="text-decoration: underline;">Copy Code</span></span>The code is as Follows:<br>*{<br>margin:0px;<br>padding:0px;<br>}<br>The second step: the overall background of our web page, we want the results of the content center, the background gradient is always covered with the Screen.<br>In this case, we can add a background image to the Body. let the base be tiled horizontally.<br><br><span style="text-decoration: underline;"><span style="text-decoration: underline;">Copy Code</span></span>The code is as Follows:<br>body{<br>Background:url (image/bj.jpg) repeat-x;<br>}<br><p><p></p></p><p><p>Step three: by observing we can divide our web page into five parts first, then write the corresponding HTML code for it.<br>HTML code:<br><br></p></p><span style="text-decoration: underline;"><span style="text-decoration: underline;">Copy Code</span></span>The code is as Follows:<br><div id= "header" ></div><br><div id= "nav" ></div><br><div id= "banner" ></div><br><div id= "main" ></div><br><div id= "footer" ></div><br>The PS measurements show that the five parts occupy 950 wide and are Centered. we can use the group selector to center the five Div First.<br><br><span style="text-decoration: underline;"><span style="text-decoration: underline;">Copy Code</span></span>The code is as Follows:<br>#header, #nav, #banner, #main, #footer {<br>margin:0px auto;<br>width:950px;<br>}<br>Fourth Step: complete the header section first<br>Logo: generally this part has two Requirements. 1 click on the logo to return to the Homepage. 2 should pay attention to SEO aspect? So we used the following HTML code:<br>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.