, you also create a BFC for the element, that is, the. float and. Text are BFC, which is why both the right and the left are not around each other.
A common way to create a BFC
In addition to using overflow , some other CSS properties can also create BFC, as we see above, floating an element can also create a BFC for the element, the floating element will wrap its internal elements. There are several ways to create the BFC:
Use position: absolute or p
is surprisingly concise and very generic, compared to several traditional layout schemes described earlier, with a simple three-line CSS that implements a common five layouts.
Summarize
The traditional layout method is based on the box model, depending on the display property +position attribute +float property, logic is relatively complex, for som
css| tutorial Are you learning CSS layouts? Are you still unable to fully master the pure CSS layout? There are usually two situations that hinder your study:
The first possibility is that you have not yet understood the CSS Proc
finishing http://jessezhao.cnblogs.comPage 14. Group selector. 145. Derivative selector. 146. id selector 146. Category selector. 157. Define the link style 15Webpage Design DIV + CSS -- 8th days: CSS layout entry. 151. Define DIV 152. CSS2 box model. 163. background processing is used for all secondary images. 17Webpage Design DIV +
Grid
With grid layout, you can make your page layout look like a grid. You can place each component in the desired position.
HTML:
CSS:
#container { display: grid;
choose a grid template that works best for your project at hand.
You can split a blank document to create an even or odd number of columns. It is often helpful to consider the raphe (blank space between columns) into your grid system.
Your grid can be very complex, can be very simple, as you like. The more complex and sophisticated your
own content on the screen. When the display: block is used, the element forms a wide block as its own point operator, this setting is very convenient for the big button.
At the bottom of the preview, you can see that the JS Code and segment are added to the Code. It is used to control the display of the drop-down menu under the IE browser. Li: hover ul is acceptable, but IE's support for CSS is still complete, so Javascript is needed for control.Ne
A simple Responsive horizontal Grid layout framework Responsive Grid System, responsivegrid
There is a problem in web design that cannot be circumvented, that is, the layout problem. In general, a div may be divided into many parts, which are also divided horizontally into two parts. However, in different projects, we
The very beautiful Div + CSS layout getting started tutorials include many terms in Webpage creation, such as CSS, HTML, DHTML, and XHTML. In the following article, we will use some basic knowledge about HTML. Before you start this tutorial, make sure that you have a certain HTML base. Next we will start to use DIV +
1. Page Layout and planning
There are many terms in web page creation, such as CSS, HTML, DHTML, and XHTML. In the followingArticleWe will use some basic knowledge about html. Before you start this tutorial, make sure that you have a certain HTML base. Next we will start to use Div + CSS for webpage
. Define body style
Define the body style of the entire page first, with the following code:
body {margin:0px;padding:0px;Background:url (.. /images/bg_logo.gif) #FEFEFE no-repeat right bottom;font-family: ' Lucida Grande ', ' Lucida Sans Unicode ', ' Arial ', ' New song Body ', Arial,verdana,sans-serif;COLOR: #666;font-size:12px;line-height:150%; }
The function of the above code in the last day of the tutorial is detailed, you should see it. The bor
In web authoring, there are many terms, such as: CSS, HTML, DHTML, XHTML, and so on. In the following article we will use some basic knowledge of HTML, and before you learn this introductory tutorial, make sure you have a certain HTML base. Let's start by using DIV+CSS to design your Web page layout in one step.
All
In Web page production, there are many terms, such as CSS, HTML, DHTML, XHTML, and so on. In the following article we will use some basic knowledge about HTML, and before you learn this introductory tutorial, make sure you have a certain HTML base. Let's start with a step-by-step use of DIV+CSS for Web layout design.
define the body style of the entire page, the code is as follows:
body {margin:0px;padding:0px;Background:url (.. /images/bg_logo.gif) #FEFEFE no-repeat right bottom;font-family: ' Lucida Grande ', ' Lucida Sans Unicode ', ' XXFarEastFont-Arial ', ' Neo-Arial ', Arial,verdana,sans-serif;COLOR: #666;font-size:12px;line-height:150%; } The above code role in the last day of the tutorial has detailed instructions, we should look at the understanding. Def
Css -- three rows, three columns, high layout, graphic tutorial, http://www.alistapart.com/articles/holygrail
This translation page is copyrighted by greengnn. For more information, see the source.
Step 1: create a structure
Xhtml starts with header, footer, and container
CSS first defines the container and
whole page body. The Code is as follows:Example Source Code [www.52css.com] body {MARGIN: 0px;PADDING: 0px;BACKGROUND: url (../images/bg_logo.gif) # fefefefe no-repeat right bottom;FONT-FAMILY: 'lucida grande', 'lucida Sans Unicode ', '',' ', arial, verdana, sans-serif;COLOR: #666;FONT-SIZE: 12px;LINE-HEIGHT: 150% ;}The role of the above Code is described in detail in the previous day's tutorial. you should understand it at a glance. Set the border t
are all using columns and rows, the Grid-column and Grid-row attributes; in the article element tag, I put him in the second row of the grid, the second column, which is in the center of the 3*3 grid. Similarly, I used Grid-column-span in header and footer tags, which gave
thousand thousand. From a choice, perhaps helpless, perhaps just in line with the ideal.In this chapter, I first talk about CSS grid layout (grid layouts), although the current major browsers only ie10+ support slightly better, but this technology is also clearly included in the network.Is it later fully supported by
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.