I wrote a jsp page today. I tried to adjust <div style="margin:0 auto">123xxx</div> but it didn't make the page display in the center. And other styles also had inexplicable problems. Later I found the solution to this problem: It turns out that L-Blog does not add DTD before HTML by default, so IE interprets the document as HTML instead of XHTML. The problem is not with CSS but with the XHTML pages themselves. You need to add the following code to make the above settings effective: Copy code The code is as follows:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> If you want the stricter XHTML 1.0 Strict or XHTML 1.1 please refer to the relevant documents. The above tests are based on IE6 and FireFox 1.0 final version on Windows XP SP2. It is recommended that if you need to use CSS styles on the page, do not delete this line: Copy code The code is as follows:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<<: Detailed explanation of the use and underlying principles of MySQL table partitions
>>: Detailed explanation of the significance of standard commit msg in JavaScript development
This article shares the specific code of js to im...
To merge the following two files, merge them toge...
Here is the mysql driver mysql.data.dll Notice: T...
Benefits of using xshell to connect to Linux We c...
Table of contents In the React official website, ...
Div basic layout <div class="main"&g...
A friend in the group asked a question before, th...
The MySQL explain command can analyze the perform...
Table of contents 1. Scenario 2. Solution 3. Conc...
To achieve an effect similar to Windows forms, dr...
This article example shares the specific code for...
To set the line spacing of <p></p>, us...
Let's first understand a wave of concepts, wh...
This article introduces how to install MySQL 8.0 ...
Effect: CSS style: <style type="text/css&...