An example of a change in the Dedecms template layout

Source: Internet
Author: User

Reprint please indicate is quoted in http://blog.csdn.net/chenyujing5678

Welcome to shoot Bricks!

An example of a change in the Dedecms template layout

first, the effect of the change template layout:

Post-Change layout:

ii. Methods of modification 1, view the original code

In index.htm, we use Utraledit to open to see that the whole master and a table,table under two parts:

<TD id= "ILeft" >, <td id= "IRight" >

The corresponding left and right effects are as follows:

Let's analyze the contents of the <TD id= "ILeft" > block, which contains four parts:

2. Find out why

To achieve our results, we must change the code in the table. Our goal is to place the first element of the <TD id= "IRight" > under the top of the table

3. Start the manual

Put the target code

<div style= "Background:url ({dede:global.cfg_cmspath/}/templets/baobei/images/channel/bgimg0100.jpg) no-repeat 17PX 9px; Text-align:left; " ></ Div>

Move to table below:

Iii. Summary 1. Use of table

From this example, we see that the code in the table in the layout, starting with the order of the cell size <tb>, is the size of the inside to dynamically adjust the width, and this call is mainly a. css file to control.

Eg: The class field as shown in the figure below

2, learned the div using style= "background:url to define the method of this div background, and then add a picture in the foreground with SRC.

<div style= "Background:url ({dede:global.cfg_cmspath/}/templets/baobei/images/channel/bgimg0100.jpg) no-repeat 17PX 9px; Text-align:left; " ></ Div>


3. The DEDECMS code achieves the following effects:

The code in the following illustration shows:

3, 1 class= "Ipro_title1" to display the title "Product Center"

Its key content is the class= "ipro_title1" field, which reads as follows:

Haha, define Css:.ipro_title1. Left

At the time of use is

3, 2 <div class= "Ipro_detail" to show each product detail

As shown in the figure above, it is also a table

It seems that the template of the people to write the content to die, in practice, asked us to add flexible content can be displayed, it seems to be changed here.

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.