Resaltar fila de una tabla que se encuentra contenida en una pagina de plantilla
Publicado por MAS82 (22 intervenciones) el 16/03/2017 12:49:56
hola buen día, tengo una tabla que esta contenida en una pagina de plantilla; de la cual quiero que se resalten las filas al pasar el cursor de mouse por encima con la utilización de un CSS el cual es hover es decir :
El inconveniente se presenta al aplicar este código en mi pagina de plantilla ya que en lugar de resaltar las filas de la tabla contenida en ella, se resalta de forma desordenada las filas de la plantilla.
Aquí muestro el código completo. por favor espero su ayuda.
1
2
3
table tr:hover {
background-color: #f00;
}
El inconveniente se presenta al aplicar este código en mi pagina de plantilla ya que en lugar de resaltar las filas de la tabla contenida en ella, se resalta de forma desordenada las filas de la plantilla.
Aquí muestro el código completo. por favor espero su ayuda.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!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"><!-- InstanceBegin template="/Templates/plantilla admin.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin título</title>
<style type="text/css">
<!--
table tr:hover {
background-color: #f00;
}
table {
border-spacing: 0;
}
.bordered {
border: solid #ccc 1px;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: 0 3px 3px #ccc;
-moz-box-shadow: 0 3px 3px #ccc;
box-shadow: 0 3px 3px #ccc;
}
.bordered td, .bordered th {
border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
padding: 10px;
text-align: left;
}
.bordered td:first-child, .bordered th:first-child {
border-left: none;
}
.bordered th:first-child {
-moz-border-radius: 0px 0 0 0;
-webkit-border-radius: 0px 0 0 0;
border-radius: 0px 0 0 0;
}
.bordered th:last-child {
-moz-border-radius: 0 0px 0 0;
-webkit-border-radius: 0 0px 0 0;
border-radius: 0 0px 0 0;
}
.bordered tr:last-child td:first-child {
-moz-border-radius: 0 0 0 0px;
-webkit-border-radius: 0 0 0 0px;
border-radius: 0 0 0 0px;
}
.bordered tr:last-child td:last-child {
-moz-border-radius: 0 0 0px 0;
-webkit-border-radius: 0 0 0px 0;
border-radius: 0 0 0px 0;
}
.Estilo75 {font-size: 16px; color: #336699; font-family: Georgia, "Times New Roman", Times, serif; }
.Estilo79 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 16px; color: #666666; }
.Estilo80 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 34px;
color: #336699;
}
body {
margin-left: 10px;
}
-->
</style>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
background-image: url(imagenes/fondoaplicacion.png);
margin-top: 0px;
margin-left: 0px;
}
.Estilo47 {
font-family: "Courier New", Courier, monospace;
color: #FFFFFF;
font-size: 28px;
}
.Estilo56 {font-family: "Courier New", Courier, monospace; color: #FFFFFF; font-size: 18px; }
-->
</style>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<table width="1356" height="617" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td width="18"> </td>
<td width="214" height="51"> </td>
<td width="614"> </td>
<td width="90"> </td>
<td width="90"> </td>
<td width="130"> </td>
<td width="85"> </td>
<td width="67"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td colspan="6" rowspan="9"><!-- InstanceBeginEditable name="contenido" -->
<p><span class="Estilo80">Lista de Usuarios</span></p>
<p>
<?php
require('conexion.php');
$sql=$conexion->query("SELECT us.id_usuarios, us.usuario, us.dni, us.email, us.cargo
FROM usuarios us");
?>
</p>
<p><a href="nuevodetallepedido.php"> Nuevo Detalle</a> </p>
<table align="left" class="bordered">
<thead>
<tr>
<th bgcolor="#FFFFFF" class="Estilo75"><div align="center">Id</div></th>
<th bgcolor="#FFFFFF"><div align="center"><span class="Estilo75">Usuario</span></div></th>
<th bgcolor="#FFFFFF"><div align="center"><span class="Estilo75">Dni</span></div></th>
<th bgcolor="#FFFFFF"><div align="center"><span class="Estilo75">Email</span></div></th>
<th bgcolor="#FFFFFF"><div align="center"><span class="Estilo75">Cargo</span></div></th>
<th bgcolor="#FFFFFF"><div align="center"><span class="Estilo75">Modificar/Eliminar</span></div></th>
</tr>
</thead>
<?php while ($row = $sql->fetch_assoc()){?>
<tr>
<td bgcolor="#FFFFFF"><div align="center" class="Estilo79">
<div align="center"><?php echo $row['id_usuarios'];?></div>
</div></td>
<td bgcolor="#FFFFFF"><div align="center"><span class="Estilo79"><?php echo $row['usuario'];?></span></div></td>
<td bgcolor="#FFFFFF"><div align="center"><span class="Estilo79"><?php echo $row['dni'];?></span></div></td>
<td bgcolor="#FFFFFF"><div align="center"><span class="Estilo79"><?php echo $row['email'];?></span></div></td>
<td bgcolor="#FFFFFF"><div align="center"><span class="Estilo79"><?php echo $row['cargo'];?></span></div></td>
<td bgcolor="#FFFFFF"><div align="center"><span class="Estilo79"><a href="modificar_usuario.php?id_usuarios=<?php echo $row['id_usuarios'];?>">Modificar</a> /<a href="eliminar_usuario.php?id_usuarios=<?php echo $row['id_usuarios'];?>">Eliminar</a></span></div></td>
</tr>
<?php } ?>
</table>
<?php
$conexion->close();
?>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td> </td>
<td><span class="Estilo56"> Inicio</span></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td class="Estilo47"> </td>
<td class="Estilo56">Pedidos</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td class="Estilo47"> </td>
<td class="Estilo56">Carta</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="Estilo47"> </td>
<td class="Estilo56">Usuarios</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Valora esta pregunta
0