S
Stefan Mueller
The following code works in Internet Explorer perfect. If you move the
mouse pointer over the red header area the header text gets
highlighted.
But in Mozilla Firefox and Opera the header text gets already
highlighted before the mouse pointer is over the red header area (it
needs to be only close to the red header area).
=====================================
<html>
<head>
<style type="text/css">
th {
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
background-color: #ff0000;
}
div.header_inside {
position: absolute;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
width: 100%;
height: 100%;
}
div.header_outside {
color: #000000;
position: relative;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
width: 100%;
height: 100%;
}
div.header_outside_mouseover {
color: #ffffff;
position: relative;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
width: 100%;
height: 100%;
}
td {
background-color: #0000ff;
}
</style>
</head>
<body>
<table width = "150px">
<thead>
<tr>
<th>
<div class = "header_outside"
onMouseover = "className = 'header_outside_mouseover'"
onMouseout = "className = 'header_outside'">
Column 1
<div class = "header_inside"></div>
</div>
</th>
</tr>
</thead>
<tbody>
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
</tbody>
</table>
</body>
</html>
=====================================
I tried to modify the following lines
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
to
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
Then it works also in Mozilla Firefox and Opera but my header doesn't
have the same formatting anymore.
mouse pointer over the red header area the header text gets
highlighted.
But in Mozilla Firefox and Opera the header text gets already
highlighted before the mouse pointer is over the red header area (it
needs to be only close to the red header area).
=====================================
<html>
<head>
<style type="text/css">
th {
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
background-color: #ff0000;
}
div.header_inside {
position: absolute;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
width: 100%;
height: 100%;
}
div.header_outside {
color: #000000;
position: relative;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
width: 100%;
height: 100%;
}
div.header_outside_mouseover {
color: #ffffff;
position: relative;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
width: 100%;
height: 100%;
}
td {
background-color: #0000ff;
}
</style>
</head>
<body>
<table width = "150px">
<thead>
<tr>
<th>
<div class = "header_outside"
onMouseover = "className = 'header_outside_mouseover'"
onMouseout = "className = 'header_outside'">
Column 1
<div class = "header_inside"></div>
</div>
</th>
</tr>
</thead>
<tbody>
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
</tbody>
</table>
</body>
</html>
=====================================
I tried to modify the following lines
padding-left: 7px;
padding-right: 7px;
padding-top: 4px;
padding-bottom: 4px;
to
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
Then it works also in Mozilla Firefox and Opera but my header doesn't
have the same formatting anymore.