Browser development/css Layout/How to use?

Source: Internet
Author: User
Tags html tags
css| Browser

Browser development/css Layout/How to use it properly?

IE7 is approaching ... Why use the word approximation? Because I am worried about websites that used to use CSS layouts.

CSS Hack

Once in order to allow multiple browsers to achieve the same effect, the use of CSS layout, I used CSS Hack. But with the arrival of IE7, some of the effects of the failure, the layout has emerged a serious problem. Is this the kind of CSS layout that we're advocating that's so unsettling?

A problem naturally brings to mind the cause of the problem. It is not difficult to find that we use CSS hack are in the solution of some trivial things, the original clean CSS style sheet made mysterious and confusing, I think this is not the surprise that CSS brings us, but a disaster.

is CSS layout appropriate?

It's possible to read here that there are such questions, but I often ask myself this question since I learned and started using this layout technique in practice.

My first work, but said is really carried out css+div such a train of thought, but when I removed the style sheet, I found that there is no level, the text picture randomly stacked in every corner. So use the layout when you have to consider the proper use of labels.

Later used the legendary FF browser, and then found his previous n works in this browser can be described in terms of ugliness. It was also from that day that I knew that this savior was not as desirable as he imagined.

Now that the problem is on the browser's alternate issue, it seems that all the problems are due to the giant's occasional new product.

Stick to it or use it rationally?

It may not be the same people who have been complacent about using this technology to make their own websites. After all, it is more common to let the people who use it know the possible problems of the layout technology and how to use it properly.

summed up the following:

1. Use a market-popular browser for testing
Do not take the old browser can hardly see a user to do the test, it is self-abuse ...

2. Don't just use div
If you do, you'll be sorry. Other HTML tags ...

3. Make area layout instead of detail layout
If you want to make a pixel map with CSS, I can only say that you have deified this technology ...

4. Try not to use hack
If you are confident that you can keep abreast of the browser hack, go ahead. It might be harder.

5. Using simple layouts
When you use n nesting, you know, Div is as annoying as a table.

6. Proper use of style names
You don't have to use foreign language to know what's going to work right away.

7. Don't just write the style into a separate file
There is no need to run to a. css file for a particular color of a text on a page so that it reads on every page?

8. Use Table layout on table
Do not make a page can not find a table to be considered a standard page, the effect, we see is the effect. Don't forget the English meaning of table

Something

In fact, what technology is a certain limitation, only by utilizing the advantages of each technology can we make excellent works. The above opinions belong to me personally, recently can find some stations to reprint some of the translation of the article, although I do not object to do so, but I would like to reprint the article of these time to summarize some things, Should it be better to post on your own station? It's my personal little gripe ... Oh, hope to read these can help you some



Related Article

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.