Home > CMS Tutorial > WordPress > How to use elimination to solve problems with templates

How to use elimination to solve problems with templates

藏色散人
Release: 2020-01-11 09:41:37
Original
2785 people have browsed it

How to use elimination to solve problems with templates

How to use elimination method to solve template problems?

Use the elimination method to solve template problems

Recommended: "wordpress tutorial"

in wordpress template During the production process, there are some seemingly complicated problems. In fact, most of them can be solved by themselves as long as the location of the problem is determined. 1. Use Firebug for troubleshooting 1.1 Brief introduction and installation method Firebug is a plug-in for Firefox that provides a complete set of tools necessary for web development. From the writing of HTML, to the beautification and optimization of CSS style sheets, and in the process of making WordPress templates, there are some seemingly complicated problems. In fact, as long as the location of the problem is determined, , most can be resolved on their own.

1. Use Firebug for troubleshooting

1.1 Brief introduction and installation method

Firebug is a plug-in for Firefox that provides a complete set of tools necessary for web development. From writing HTML, to beautifying and tuning CSS style sheets, and...

So we must first install the Firefox browser.

After installing the browser, select the "Tools" menu on the menu bar, click "Add-ons" ==> "Get add-ons"

Enter "firebug" in the input box . After the search results come out, click the Firbug link to enter the Firebug download and installation page.

1.2 Usage

After the installation is completed, right-click on the location where you made the error ==> View the element to find out where the wrong style is.

2. Border background debugging method

2.1 Brief introduction

If the page is abnormally browsed in IE but normal in FF, it will be more troublesome. At this time, we can give Set a conspicuous border or background for elements for debugging.

2.2 How to use

First estimate the location of the error, add style="border:1px solid #000" to its label, so that you can see that the module occupies What position and whether it is in the growth category.

3. Maximum width and minimum width

3.1 Brief introduction

During the template production process, sidebars often sink, usually in the content area. Caused by too much width, but not definitely.

3.2 Solution

In this case, we can first set the width of the content to 100 or less and add the overflow:hidden attribute to hide the excess part. If the width is reduced, the sinking problem is solved. You can determine that the problem occurs on this element. After that, you can change the margin-left, the width, or hide the images that exceed the width. You can test it bit by bit and adjust the perfect version. (I saw a colleague before who reduced the width by 10 each time to test. Since it is a test, wouldn’t it be easier to find problems by reducing it by 100?)

3. Style elimination method

is a bit complicated The page may load N external link CSS files, then delete the CSS files one by one, find the specific CSS files triggered by the BUG, ​​and narrow the scope of the lock.

For the problematic CSS style file just locked, delete the specific style definitions line by line, locate the specific trigger style definition, and even the specific trigger style attributes.

4. Module confirmation method

Sometimes we can also start from the HTML element of the page. Delete different HTML modules in the page and find the HTML module that triggers the problem

The above is the detailed content of How to use elimination to solve problems with templates. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template