You can define the link styles in different content blocks by different rules. Similar to this: #nav a:link or #main a:link or #footer a:link. You can also define different styles for the same elements in various content blocks. For example, the
For every web developer, browser compatibility is a big problem, with Firefox and IE being the main user browser. In general, we will install a different browser to test, Firefox users can use IE tab this person extension for debugging.
Now, you can
Here are examples of some of the more commonly used properties.
Margin
margin-top:1px;
margin-right:1px;
margin-bottom:1px;
margin-left:1px;
Code simplification to:
css List Grid View layout css li St Grid layout compatible and tested with IE6, IE7, Safari 2, Safari 3, Firefox 2, Opera 9.21list Grid view sodales Porta libero.n sodales PO Rterat. Nunc EU risus ut dolor bibendum adipiscing. proin sodales
For example:
Some Content
Now preview this code and we'll find the outermost parent element float container, and it's not displayed. This is because the child element is floating and detached from the document stream, resulting in a parent
You can use this property when you think the picture is too close to the text.
Text spacing: hspace and vspace settings
1. Horizontal interval: hspace.
For example: (Units are also calculated in pixels (pixel).) )
2. Vertical interval:
I have two examples here, if your browser is IE, you can test it!
1, first look at these lines of code!
Copy CodeThe code is as follows:
Note: I wrote one more
, this label is not closed!Look at the effect, rest assured, this will not die!
Click to view the results:
untitled document The following two div styles are basically the same, but the first plug-in (understand my meaning on the line) style: Background-color a!important behind, So, although the first Div line CSS
They are used to combine a large chunk of HTML code with certain information, most of which are associated with elements using Class attribute class and Identity attribute ID, see CSS Intermediate Guide class and ID selector.
The difference
prcss tabs www.jb51.net Home hehe, ignoring the original class value of Div. Test Continue ignoring H3 original class value. Boredom h3 No value can also ~ The Silly Egg div No value can ~ home hehe, ignoring the original
Center vertically with Line-height
line-height:24px;
With a fixed-width container and one row vertically centered, use Line-height (the height is consistent with the parent container), and more vertical centers can be seen here.
Clear Container
The formal description found online:
Reference content
This value causes an element to produce a blocky box model (Block box), which itself flows as a single inline box model (flow), similar to an substituted element. A block box model is formed
First, look at the page often appear in the button and text box of the original!
In contrast, how can we change the shape of the text box and the button? The following I provide you with two kinds of text box and button style as an example
Although fortunately Firefox3 in the resolution of this bug, but Firefox3 still in the beta phase, replace Firefox2 still need some time, the following to carefully say this question:
First, the style is {position:absolute;} The form input box in
First, let's look at a simple example.
http://www.cssrain.cn
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
This is a new problem, and the Web pages that are currently working in IE7 are problematic in IE8.
Microsoft offers three modes of parsing pages in IE8
IE8 Standard Modes: The default mode, in strict accordance with the relevant regulations
IE7
Ie5mac filters are also valid for IE8 beta version 1
IE8 Beta version 1 does not support truncation, that is, the CSS3 in the text-overflow:ellipsis;
About the first article may have little impact on everyone, no matter how the Mac under the people
We've talked about the difference between strong and EM in the front. In addition to strong and EM there are some similar tags such as q, cite, blockquote. These three belong to the reference class, but there are some differences here, first of all
Use JavaScript expressions in CSS expression. CSS properties are set based on the results of the JavaScript expression calculations.
CSS expression does not work in other browsers, so it is useful to set it separately for IE in cross-browser
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.