开发者

CodeIgniter CSS trouble

开发者 https://www.devze.com 2023-01-22 20:44 出处:网络
I am having a very strange problem, when I use CSS :hover in a td in a static HTML file, it works fine (see the navigation bar on http://www.nutricioncelular.es/REG开发者_Python百科ISTRATE.html)

I am having a very strange problem, when I use CSS :hover in a td in a static HTML file, it works fine (see the navigation bar on http://www.nutricioncelular.es/REG开发者_Python百科ISTRATE.html)

When I use it in a CodeIgniter view however, (code is the same, see http://www.nutricioncelular.es/index.php) the red color on td background doesn't work. The code is exactly the same, and the call to the view is a simple load view with no parameter, no data.


The code for the two pages are not exactly the same - the PHP view using CodeIgniter has this in front of the doctype declaration, triggering Quirk Mode and thus breaking your CSS:

<html>
 <HEAD>
  <TITLE>Inca</TITLE>
  <meta http-equiv="Content-Style-Type" content="text/css">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 </HEAD>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


This is really very strange,

.MENUCELDA:hover 

class is not applying in php version of application, but it I modified it to

td.MENUCELDA:hover 

is working as expected in php version site.

0

精彩评论

暂无评论...
验证码 换一张
取 消