An example of the change in dedecms template layout

Source: Internet
Author: User
Tags one table

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

Welcome to the Brick!

An example of the change in dedecms template layout

the layout of the template of effect change:

Changed layout:

ii. Methods of modification 1, view the original code

In Index.htm, we open with Utraledit to see that the whole lord and one table,table are divided into two parts:

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

The corresponding effect is 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 put the first element of <TD id= "IRight" on the top of the table.

3. Start

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:

Third, summary 1, the use of the table

From this example we see the code in the layout in the table, which adjusts the width dynamically with the size of the <tb> at the beginning of the grid, and this call is primarily. css files to control.

Eg: The class field shown in the following figure

2, learn the div in the use of style= "background:url to define this div background method, and then in the foreground with SRC to join the picture."

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


3, Dedecms code to achieve the following effects:

As shown in the code in the following figure:

3, 1 class= "Ipro_title1" used 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 display the details of each product

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

It seems that the template to write the content of the dead, in the actual requirements of our flexible additions to the 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.