Home > Web Front-end > HTML Tutorial > The table sets the background image and cannot display 100% of the solution_HTML/Xhtml_Web page production

The table sets the background image and cannot display 100% of the solution_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:40:49
Original
2196 people have browsed it

The following situation was discovered during development:
(1) If the file is stored in the form of a .jsp file suffix, the code is as follows (index.jsp):

Copy code
The code is as follows:

<%@page contentType="text/html; charset=utf-8" pageEncoding= "utf-8" language="java" %>




Let the table display 100%
< /head>



< tr>



< /table>



After the program is run, the effect displayed on the page is as shown below:

There are two things wrong with this effect:
(1) The background of the middle td does not cover the entire td;
(2) The entire table width does not fill the entire screen.
I am puzzled and very depressed! ! In the background, I try to add border="0" to the table, and the effect is still as shown in the picture above. Change 0 to 1 and find that the table fills the entire screen, and the td is also covered by the background, as shown below, but the border of the table is not what I want.

It is found that the above method cannot fundamentally solve the problem.
Then I checked the three TDs in the table and found that there was no content in the second TD, so I tried to fill in the content in the second TD. The code is as follows:

Copy code
The code is as follows:

< /td>




The second td adds content< /td>
< ;/td>


The effect after running the code is basically in line with the final result. The running effect is as follows:

Just adjust the code slightly below. The complete code is as follows:

Copy the code
Code As follows:

<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8" language="java" %>




让表格百分之一百显示








 




最终效果如下图所示:




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