"Getting Started" how to get started with div CSS technology?

Source: Internet
Author: User
Tags dreamweaver


Introduction:

Quoting a passage from a book: "When I first began to learn Chinese, my family teacher Lao Wang gave me a Chinese-English dictionary, an English grammar book and a beginner's tutorial." But he put the books in a basket and said it would be useful next week. In the first week, he only taught me to listen and remember some phrases. Before starting a rigorous and orderly study, he asked me to learn how to retell some essays. "Excuse me, where is the restaurant?" ”。 "Give me some rice, please." "How much does this dress cost?" ”。 In that week, I had to accept knowledge, sentence structure, pronunciation and grammar unconditionally. However, by Friday I could go to a Chinese restaurant and ask for a bowl of rice and pay got their sums. No theory, no explanation, is that these simple phrases give me enough grammar and vocabulary to do this.

I do not know from when the CSS began to pay attention to the people. Many people have started to learn CSS, but do not know where to start, so this article is written to those beginners, take them on the CSS train. A. CSS learning heavy in the method!

Learning anything is the same, from primary school, secondary school, university, in addition to learning knowledge is to learn methods!

To master the CSS, first of all to learn HTML, I was just beginning to learn from scratch, spent one months to learn HTML, no teacher, the book is my only teacher, there is no internet conditions! One months later, I began to learn CSS, just started to read the first CSS book is "CSS Web page style design" to see a few days after the discovery can not understand! , after a copy of the "HTML Reference", this book is a web-maker's desk standing book! Change this book to learn CSS, because there is a part of the CSS, it became my CSS Enlightenment book. After looking at a few paragraphs, I feel that the foreign-written tutorial is very organized, easy-to-go, step by step to guide you forward, let you understand what they are saying, rather than the depth of the book in the domestic, lack of order, as if afraid you do not know he is very knowledgeable! As I said before the book "CSS Web page style design" at that time, for beginners of CSS, I really do not know what it is saying!

To talk about the details of the learning process, because a style it is not possible to break away from the HTML page, HTML is not combined with the style, CSS lost its existence meaning. So the general book will give an example, and then let you on the machine test effect, this is the author wants to let you have a style sheet CSS has a preliminary impression, tell you what CSS can do. A little example: "Small, perfectly formed," you may not understand the true meaning of each statement. But you can remember the example of the pattern, in the practice of continuous use, and constantly use the process is to keep in mind the process, so can not restore the heart, can not always think of their memory is not good, but whether you ride the cow or the maxima, as long as there is perseverance, will reach the end.

Read a book, in general, the first time to read through the whole book, do not understand also to look down, in the process of looking down you may find the answer to that question. After reading you have a general impression, but there must be a lot of things do not understand, it doesn't matter, continue to look down.

The second time you want to watch while doing study notes, you think is the focus of the part of writing, and you feel that the part of the question to be noted, with doubts to see, if there is no answer, you can go to BBS on a post, good people or a lot of, hint: "must learn how to ask questions!" "I won't say it here." You have to go on the machine to practice the example of the book, the most confusing to you: "One is not remember, the second is the understanding of the concept of the wrong (this one may be a bad book translation, the other is your understanding of the wrong)", for the first you have to build confidence, adhere to continue. When you get to the finish line, you find that everything is a logical thing. Because you work hard, the effort will have the return, has the result.

There are a lot of people have seen, but there is no progress, I analyze the main reasons for the following:

Reason one: Pressure is not enough, because there are a lot of people such as the art of CSS, because it is to see others learn, so learn, do not learn there is no advantage! This kind of pressure is very small, the school is not good and the art of this bowl of rice.

Reason two: Only the amateur study, this kind of study still just play a play, because you do not have to take this technology to eat.

Reason three: The method is wrong, some people just look at the tutorial, but he does not do, I used to see too much, do too little, so have the practice you can put the theory of things in. Two. Mastering the four learning stages of CSS

Once I asked a netizen, is it difficult to learn CSS? She said: "Not hard" how long have you been studying? She said, "just learn." Actually, she was right! If someone asked me to learn CSS difficult? I will say: "Hard!" "Why would I say it hard?"

Learning CSS can be divided into the following stages:

Phase one: You can make the page without thinking about the compatibility of the browser, but the page is filled with the table's pattern div.

Phase two: Think of compatibility issues, but can not be prevented in advance, will only fix the problem, a lot of use of hack technology (I just know about hack technology, but with very little)

Stage Three: The bug can be prevented in advance, but the style sheet is heavily applied id,class,css is overlapping style sheet, such as "DIV P SPAN". This code is the child element span of P in the div child element, so that you can define the style of the span without adding class to the span. This is the advantage of CSS, why not make good use of and must define a class it!

Stage four: This phase is the most difficult, good HTML semantic structure, reasonable CSS, reusable style. Good semantics have this aspect of the article, the reasonable CSS, these two aspects will certainly write the topic to study. Three. CSS Beginner FAQ:

Let's take a step-by-step. The first requirement is to have a caption just below the thumbnail. It's pretty straightforward: put a slice in your HTML, then a break (BR), and put the title in a paragraph (P) and place it (using CSS).

Then we want these thumbnails to be aligned with the headings in the browser window. When using table layout, this pair of thumbnails and headings will be placed in the TD separately. When using CSS layout, we have to place them in the DIV separately. To allow them to be arranged horizontally on the window, we use CSS to float the DIV to the left (float). 1: What kind of books should I choose to read in CSS?

We recommend several books first:

The CSS authoritative guide

"Website Refactoring"

"Website Layout Record"

"HTML Reference Encyclopedia"

If you are not familiar with HTML, you can read the "HTML Reference" book, this book is a teaching book is also a very good query for HTML reference. Recently published "Proficient in CSS", "Flawless web design" are very good books, but not for people who do not have a CSS foundation to read, want to be a good CSS Builder, but also have a solid foundation of English, so you can read the foreign CSS tutorial, participate in the relevant forum, some people say that Do not understand English can only look at the code, but in fact, their book is not only the code, but more importantly, they will tell us the code of Thought and coding methods, which we are worth to learn and understand. In addition, I recommend the Chinese course is: "HTML and CSS standard", Su Shen Light Rain "CSS2 Chinese Manual", electronic version of "Web Designer", the English version of the e-book a lot, not one example. Reading ebook is a very boring thing, I am not used to reading electronic version, so often buy books to see.

Question 2: What software do you use to edit CSS code?

This question seems to have been asked the highest frequency! First of all, I started with Dreamweaver to write code, because Dreamweaver software itself is a very CPU and memory consumption of software, run-time editing can be imagined. Gone for a long time after I was over to the "semi-handwritten" state, "semi-handwritten" is to use the code hint provided by DW, when you write "F" the style of "F" will immediately prompt out in the back, convenient for you to choose. If you write a few more letters, the style you want will soon be found, so that you can speed up your writing style, but one disadvantage is that if you are out of the editor of the hint of the editing software you will not write style, such as when you modify the fine-tuning style in the programmer, he does not necessarily use the software you use, There is not necessarily a code hint function, so you can only go back to your machine and edit it and send it to the programmer! It is obviously unprofessional to do so! So if you want to be good people will be professional enough!

Said these seem to have not yet mentioned the topic:

As long as you can reach the level of handwriting, with what software can be, we recommend the use of Dreamweaver plug-in TopStyle (the latest version is Pro V3.12).

3: Write HTML first or CSS first?

There are many answers on the Web: first write the HTML, write the CSS, write the HTML after the first, and write the two at the same time. I tend to write together, first writing CSS or first writing HTML is not the right approach for beginners. If you let a person write code, you tell him to write HTML first, after writing the HTML can not be modified, and then you write CSS, if he can write, then this person must be a very high level builder! So for beginners, most of the time I propose to write at the same moment, specifically I say the steps:

1.

First to build the site, directory, such as we build a folder Css,images, these two are the most of it, and then create a new HTML file, a style.css an empty style sheet, the HTML page to connect to this external style sheet.    Then we first write the most basic layout part of the HTML, all with Div, and then add the ID or class directly in the Div, these layout parts include the coat part, the head part, the middle part, left, middle, right, copyright part and so on. After writing these, you can write the style in the style sheet, or you will write the layout of the section, we take the head as an example, in the head to write the logo section, the nav section also added ID or class. others.

2.


Why we can't write the HTML part at once, because people are likely to make mistakes, maybe your idea of writing the process is problematic, or for browser compatibility issues, some of you because of the lack of experience is not anticipated in advance, So it's possible to change your HTML code when you find a problem when you write a style. The big to the writing is this, you can also html/css at the same time, are can, see your habits. When we write code, we often write code side tests, not to write a test sentence, but to write a piece of code after the browser test, I was at the same time with the FF test IE6. A good producer their code most of the time they write a lot when they test, because if a person has more experience, they will know and prevent the browser error display in advance! So they write code faster than inexperienced people. They've been through the mistakes you're going through, the first time you've encountered the wrong browser displaying the problem you'll have to take the time to fix it, and they can prevent or encounter it in advance to solve the problem immediately! This is one of the different points you have with them.

Beginner and master different points of the place there is a lot of players using a number of shortcut keys, so be sure to remember those commonly used shortcut keys, every small detail has a little improvement, combined together is a big improvement.

In addition to improve their own level of the best way is to more practice, find some more good HTML CSS template coding practice, at the beginning to choose a simple point, the page, and then the picture with their own ideas to restore the HTML page ...

Finally, I wish everyone to study and progress.



"Getting Started" how to get started with div CSS technology?

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.