Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to define the subject div when Dreamweaver makes a web page

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "how to define the subject div when Dreamweaver makes a web page". In the operation of the actual case, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. We have done the div segmentation of the header title bar and the logo section before. I don't know if you still remember. Today we are going to do some division on the main part of the website. I hope you will follow the previous train of thought. First of all, let's open dw.

2. Naturally, to define the body part, you need to use the body code. We enter two codes about div between body.

3. Because we are going to divide the body part into two columns, that is to say, we should define different body, named one l and one r, and the definition code is as follows:

4. When we're done, let's define their styles. When we come to the css file, the css file mainly defines the style, and of course, because we define id, we start with #.

That is:

# body_l {}

# body_r {}

The attributes we need to define are in curly braces.

5. Define the attributes of the completed style. The code is as follows:

# body_l {width:220px;height:500px;background-color:#FFC}

# body_r {width:220px;height:500px;background-color:#FFC}

Let's take a look at the effect:

6. Although we defined left and right, we found that the div on the right went to the bottom. In fact, we forgot a command, that is, float. We add the margin margin, then insert the float command, and then we'll see.

7. You can see that although they are arranged side by side, the two div stick together and can't tell why, so we add this sentence:

Margin-left:20px

Make it 20 pixels to the left, then preview it.

8. Just in time, we have finished dividing these div. In the next section, we will talk about the detailed division of div.

This is the end of the content of "how to define the subject div when Dreamweaver makes a web page". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report