Home Backend Development PHP Tutorial CSS中设立的部分参数link后无法读取使用

CSS中设立的部分参数link后无法读取使用

Jun 13, 2016 pm 12:09 PM
border gt lt nbsp style

CSS中设置的部分参数link后无法读取使用
我用link方式连接CSS文件后,table主体参数好像没有起作用,但是th td的参数起作用了,为什么啊,比如
border-collapse这个参数,在CSS里面已经设置好了,但是无效,我就把它单独摘出来放到PHP网页里面,这下倒是起作用了,谁知道为什么啊~··谢谢
CSS代码

<style type="text/css"><br />table.gridtable {<br />	font-family: verdana,arial,sans-serif;<br />	font-size:11px;<br />	color:#333333;<br />	border-width: 1px;<br />	border-color: #666666;<br />	border-collapse: collapse;<br />}<br />table.gridtable th {<br />	border-width: 1px;<br />	padding: 8px;<br />	border-style: solid;<br />	border-color: #666666;<br />	background-color: #dedede;<br /><br />}<br />table.gridtable td {<br />	border-width: 1px;<br />	padding: 8px;<br />	border-style: solid;<br />	border-color: #666666;<br />	background-color: #ffffff;<br />}<br /><br /></style><br />
Copy after login

============================
php代码
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br /><link rel="stylesheet" type="text/css" href="css/3.css"/><br /><style type="text/css"><br />table.gridtable <br />{<br />border-collapse: collapse<br />}<br /></style><br /><table class="gridtable" ><br /><br /><br /><tr><th>账号1</th><th>用户名1</th><th>密码1</th></tr><br /><?php<br />mysql_connect("localhost", "root", "a");<br />mysql_select_db("zhanghao");<br /><br />/* 查找test1表中ID为1的那行所有的数据 */<br />$sql = "SELECT * FROM 宿舍";<br /><br />/* 执行查找 */<br />$result = mysql_query($sql);<br />$row=mysql_num_rows($result);//返回取得的数据列的数目<br />if($row){                 //判断数据库中是否有值<br />while($row2=mysql_fetch_array($result)){       //注意括号结束的位置<br /><br /><br />$账号=$row2['账号'];<br />$用户名=$row2['用户名'];<br />$密码=$row2['密码'];<br />?><br /><tr><td><?php echo $账号 ?></td><td><?php echo $用户名 ;?></td><td><?php echo $密码;?></td></tr><br /><?php }           //while循环结束的括号<br />}             //if结束的括号<br />?><br /></table>
Copy after login

------解决思路----------------------
CSS文件中不需要写style标签的直接写样式表的,你这样写肯定引入无效。
------解决思路----------------------
顶3#

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution: Your organization requires you to change your PIN Solution: Your organization requires you to change your PIN Oct 04, 2023 pm 05:45 PM

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size How to adjust window border settings on Windows 11: Change color and size Sep 22, 2023 am 11:37 AM

How to adjust window border settings on Windows 11: Change color and size

How to change title bar color on Windows 11? How to change title bar color on Windows 11? Sep 14, 2023 pm 03:33 PM

How to change title bar color on Windows 11?

OOBELANGUAGE Error Problems in Windows 11/10 Repair OOBELANGUAGE Error Problems in Windows 11/10 Repair Jul 16, 2023 pm 03:29 PM

OOBELANGUAGE Error Problems in Windows 11/10 Repair

How to enable or disable taskbar thumbnail previews on Windows 11 How to enable or disable taskbar thumbnail previews on Windows 11 Sep 15, 2023 pm 03:57 PM

How to enable or disable taskbar thumbnail previews on Windows 11

What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

What are the differences between Huawei GT3 Pro and GT4?

Display scaling guide on Windows 11 Display scaling guide on Windows 11 Sep 19, 2023 pm 06:45 PM

Display scaling guide on Windows 11

10 Ways to Adjust Brightness on Windows 11 10 Ways to Adjust Brightness on Windows 11 Dec 18, 2023 pm 02:21 PM

10 Ways to Adjust Brightness on Windows 11

See all articles