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.