Program Life series news publishing system 18-28

Source: Internet
Author: User

1. I skipped 18-20 and explained CSS knowledge.

2. Questions about center display

Center is no longer accepted

# Top, # search, # Main, # footer

{

Margin: 10px auto 10px auto;

Width: 760px;

}

3. Standard and floating streams

If float is set for the element, it will be out of the standard stream.

Questions about the side-by-side display of niunanlogo and tg029logo on the homepage

# Top img

{

Border-width: 0;

Float: left;

}

Since the above elements are floating, they will be crowded up and out of their original position, so we need to clear the floating

# Search

{

Clear: left;

Background-color: green;

}

In addition, it is best to set the DIV where the floating element is located. If all its elements are floating, its height may change to 0, so we need to reset its height.

There is no problem in IE, but there will be a problem in ff (the height of div is set to 0). For compatibility, add height settings

# Top

{

Height: 120px;

}

Excerpt:

What is a normal stream? Simply put, elements are arranged according to their location order in HTML. This process follows standard descriptions.

To explain from different perspectives, I have collected some definitions that may be lengthy, specific, or obscure:

Divides the form from top to bottom into one row, and emits elements from left to right in each row, that is, the document stream.

A normal stream is the way in which elements are displayed on web pages in most cases. All HTML elements are in block boxes (Block-level elements) or Inline boxes (Inline boxes.

When the browser starts rendering the HTML document, it starts from the top of the window and passes through the entire document content process to allocate the space required by the element. Unless the document size is limited by CSS,

Otherwise, the browser vertically expands the document to accommodate all the content. Each new block-level element is rendered as a new row. The elements in the row are horizontally rendered in order until the current row encounters a boundary and then switched to the next vertical rendering line.

This process becomes a normal document stream.

It can be seen that the flow can be fully understood as a process. A normal stream is the process of arranging and locating elements.

Unless otherwise specified, all frames are located in the normal stream. That is to say, the element position in a normal stream is determined by the element position in (x) HTML.

In this case, the position is not used. Float is a standard stream.

Non-standard streams can be regarded as position and float. They are separated from the standard stream and then "located" somewhere after the standard stream output.

4. search bar control code:

<Asp: radiobutton id = "radtitle" text = "title" groupname = "condition" Checked = "true" runat = "server"/>

<Asp: radiobutton id = "radcontent" text = "content" groupname = "condition" runat = "server"/>

</Div>

<Asp: textbox id = "txtkey" cssclass = "txtkey" runat = "server"> </ASP: textbox>

<Asp: imagebutton id = "ibtnsearch" imageurl = "~ /Images/search.gif "runat =" server"

Onclick = "ibtnsearch_click"/>

① Radiobutton: Text groupname checked

② Textbox: cssclass

③ Imagebutton: imageurl onclick

5. Line-height is used for vertical center such as text

Vertical-align is used for vertical center of other controls, which is very useful.

Input

{

Vertical-align: middle;

}

6. Table

① Border-collapse this CSS attribute is used to set whether the border of rows and columns of a table is merged into a single border or each has its own border.

Value: Collapse | separate | inherit

Description of available value default value of separate. Borders are separated and not merged. Collapse border merge. That is, if they are adjacent, they share the same border. . Commonframe table

{

Width: 100%;

Text-align: center;

Border-collapse: collapse;

}

② Padding

. Commonframe th,. commonframe TD

{

Padding: 5px;

}

7. Problem

If the width of border is set for commonfrm, it is displayed differently in IE and ff.

8. You cannot preview a master page. to preview a master page, you must create a new page.

If you do not create a master page first, but then refactor it, pay attention to the following points:

If the template page contains some event processing mechanisms, you must add the corresponding code in the background code of the master page.

After the master page is applied, add a CSS style sheet to the master page.

Also, if the page has custom controls, You have to register them again!

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.