1. Default internal and external margin problems: Different browser default internal and external margin to resolve: *{margin:0;padding:0; 2. Horizontally centered problem: Set Text-align:center ie6-7 text centered, nested block elements also centered FF/OPERA/SAFARI/IE8 text is centered, nested blocks are not centered: block element set 1, Margin-left: Auto;margin-right:auto 2, margin:0 Auto; 3,
div>
3. Vertical Center problem: I
css| Web page
Use Div to layout, the proposed div should be used to organize the code structure, now we go a little deeper, Div has semantics?
The question was hotly debated in the study group some time ago, when Rice was asked: "What is semantic web,div?" "Xiao Yi replied:"
class bar (so that the ID of the non-structured div block to let the programmer define their own use)Web standards want people to write code with strict habits. Three. Using CSS Abbreviations Using abbreviations can help reduce the size of your CSS files and make them easier to read. The main rules for commonly used CSS
1. Overview 1.1 PrefaceCSS box models have properties such as content, padding (padding), Borders (border), borders (margin), and the boxes that are seen in everyday life, which can also be used as a box for things, have these properties, so they are understood in box mode.Description of the box in life:Content: Someth
others with "." (Lowercase period) Select the symbol at the beginning of the name, taking into account that the named CSS selector reuses the call in HTML.Usually we most commonly use the main name: Wrap (jacket, outermost), header (header, head), NAV (navigation bar), menu, title (column headings, general mates H1\h2\h3\h4 tags), Content (contents area), footer (footer, bottom), logo (logo, can be used with H1 tags), banner (banner, general at the t
Before reading this article, the reader needs to have a certain HTML + CSS technical skills.Don't talk nonsense, first enclose the results of the search input box:Analysis:1. Component decomposition: Decomposition into the following parts:1) outer layer: Add a container, such as Div2) Inner layer:An Input entry boxa button2. Set the style:1) Container styleAdd border property, style code:Border:solid 1px #ddd;Add border rounded border, style code:bord
DIV + CSS standardized webpage layout (2) floating layout, divcss
Box Model and floating Layout
When talking about the box model, experienced friends must be familiar with it.Content, padding, border, and border);
These attributes can be transferred to the boxes in our daily life for understanding. The boxes we see i
For the Web front-end beginners or less experienced people, the page layout is not uncommon to be confused, sometimes the previous part of the page is very neat and beautiful, but in the next part of the page will often appear chaos, such as content can not be adjusted to the developer needs of the location, Or the appearance of overlapping pages. The following is my personal in the Web page production process on the Web page layout confusion and its
Elements in HTML we divide him into one box, boxes can be placed inside the box, you can also place text, by default, we set the box maring, padding and border, regardless of what unit set the value, these values will be calculated in the overall size of the box, Although this is a very basic
style file, you can reduce the likelihood of future pages being invalidated.
10. More convenient search engines. Using HTML that contains only structured content instead of nested tags, search engines will more effectively search your content and may give you a higher rating (ranking).
11.Table layout is not flexible, you can only follow the format of Table TR TD. and div you can div ul Li can also ol Li
spot with a beautiful pattern in front of an ordinary unordered table. Site http://marine.happycog.com ...
First, use CSS rules to tell the Category attribute inventory unordered list.
ul.inventory{
List-style:disc URL (/images/common/lister2.gig) inside;}
Its invocation token:
Angelfish (for items)
Angels/frogfish (items)
Angelfish (5526 items)
Angelfish (items)
(9) Abbreviations are in the clockwise orde
, while only margin has default values in IE. In ie, the form label will automatically margin some margins, while in FF, the margin is 0;
Solution: first, the style ul is used in CSS, and FORM {margin: 0; padding: 0;} is defined to be dead. This will not be a headache in the future.
8. Div floating ie text produces a 3-pixel bug
The following section is what I pasted on the Internet.
The left object
Where can I find beautiful pages? -CSS
Where does a beautiful page come from?CSSClever style Configuration!
CSSFeatures: separation of webpage content and styles
Select the content marked by the selector in Html to display the content according to the style in CSS.
How to Apply
respectively have Left,right,bottom,top Four Properties
When setting four property values:
positioning of the box
Static : Default layout mode (the box is laid out according to the standard flow including floating mode)
relative : Relative positioning, so that the box offs
The DIV layer dialog box is displayed in jquery UI. The effect preview is as follows:Http://keleyi.com/keleyi/phtml/jui/dialog/index.htm
CompleteCodeTo save it to an HTML file. You can also preview the effect after opening the file:
Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > Html Xmlns = "Http://www.w3.org/1999/xh
As we all know, using HTML to locate text and graphs on webpages is a "heartbreaking" thing. We must use table labels and implicit GIF images. Even so, positioning accuracy cannot be ensured, because different browsers and operating platforms may change the display results.
CSS allows you to see the dawn of hope. With the CSS attributes we will learn today, you can precisely set the positions of elements, a
Learning the html (11) CSS box model from scratch-bottom, starting from scratch cssVi. Box Model-border (1)
1 Box Model-border (1)
The border of the box model is the line centered around the content and the padding. You can set the width, style, and color of the line (three
navigation (Main menu)
Sub Menu
Search box
Ribbon (e.g. shopping cart, cashier)
Footer (copyright and related legal notices)
We usually use DIV elements to define these structures, like this:
This is not a layout, it is a structure. This is a semantic description of the content block. When you understand your structure, you can add the corresponding ID to the div
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.