How to design a web page layout in visual studio? Let’s take a look at the detailed tutorial.
- Software name:
- Visual studio 2017 official version (with offline installation package) official website simplified Chinese version
- Software size:
1. Open an existing visual studio work. In this case, the Twofish website and the web page file areDefault.aspx。
2. On the web page, findBody Tags, as shown in the following figure.
3. Next, find it belowDiv tags.
4. First enter the code of the overall layout, whereid=”maincontent“Indicates that the primary area is set.
5. Width indicates the width of the main area, and height indicates the height of the main area. I set both values to100%。
6. Next, set the position of the object with theWidth and heightRepresents the wide height range of the object.
7、margin-leftRepresents the distance from the object to the left end.margin-rightIs the right end distance,margin-topFor the distance between the object and the top, I willSet toauto。
8. Finally, set the floating position of the object.floatIndicates that the position type is floating, and I set its value to right, that is, the position of the object in the window based on the right.
9. Padding top indicates the floating distance between the object and the top, padding left indicates the floating distance between the object and the left, and padding right indicates the floating distance between the object and the right.
10. The page layout of a website has been set. Next, you can freely add objects to the webpage.
When editing a web page, the code is generally used to set the overall layout of the web page. The layout can make the code in the web page more regular, and facilitate the later production and maintenance of the web page.
The above is an example tutorial of designing a web page layout in visual studio. I hope you like it. Please continue to pay attention to developpaer.
How to restore the vs window to the default window layout?
How can visual studio code add indentation effect?
How to delete the code segment manager in visual studio?