Summary: 1. Perseverance 2. Persist in writing with notepad 3. Develop good writing habits How to learn div+css 1. Develop good writing habits I remember a Delphi teacher who taught us in college said that the programs written by good programmers are like poems, well arranged and beautiful.I want to say that we should also do this when writing html and styles, for example, when writing htmlWebsite productionMy habit is to write div tags in pairs and then fill in the content.Otherwise, it is easy to drop the closing tag, and it is difficult to troubleshoot errors. Some people will say that writing simple pages is OK, but writing large pages, usually dozens of sets together, is easy to write strings, which can also happen. This needs to be avoided by proper annotation and indentation.When writing CSS, there are many recommended specifications on the Internet, such as menu for menu, CoryRight for copyright, footer for bottom, etc. The writing order is generally: display attribute - self attribute - text attribute.Of course, there are no hard and fast rules, but it is not a bad thing to follow some unwritten rules, so that your code can be easily understood by others.
How to learn div+css 2. Perseverance I won't say much about this. I need to do everything, especially writing style.There are only a few styles, and there are only a few labels.Adjusting browser compatibility requires patience and perseverance.
How to learn div+css 3. Keep writing with notepad My real contact with div+css was only one year, so I was also a beginner. At the beginning, I also dragged and dragged in DW. When I did something, I never looked at it in the design view, regardless of what the page code was. Our teachers taught me that way. At that time, the concept of web pages was the stacking of pictures and animations.After graduation and working, I was very lucky to meet a good supervisor, who helped me a lot in my initial study of css.I was asked to write completely in notepad, so I borrowed a book from the artist next door. I forgot the specific name of the foreign country, the red and white cover, and a book called CSS Basic Tutorial.The next one is Su Yu's css help manual. He writes, reads and checks the manual at the same time. Maybe my method is not the best, but it suits me very well.If you start to rely too much on software, it will take a long time to remember many styles in css, and it will not be easy to use them. After slowly memorizing each style in the manual, in order to improve the development efficiency, you can use (Dreamweaver for short, the same below) to write.
Web page design: browser compatibility issues of DIV+CSS web pages
Browser compatibility problems of DIV+CSS web pages 1. Give up IE5 and IE5.5 and only support the latest browser, which can save a lot of time. 2. For IE6, the box model Hack is not used.If only for popular browsers, the same effect can be achieved with only a few Hacks.
I noticed the CSS of NetEase's new homepage, and one of them!Neither important nor Hack, but the display effect in FF and IE is very good.Hack can be avoided by using CSS properly.Of course, the debugging time will be more.
3. All contents in the container containing floating elements should be designed to be consistent with the container.If it is too large, it will slide to the wrong position.Using a negative margin to adjust out of the container can also cause slippage.
For example: If there are two floating elements in the Overflow page and too much content is output in the left container, the right container will run down.That is to say, your margin, width or padding settings are confused, but they cannot be reflected in FF.Use overflow: hidden or overflow: scroll to avoid IE allowing content to overflow containers. This article was published by Beijing Website Construction Company Shangpin China//ihucc.com/