style tag for table row
hi..
i have a html code where i am specifiying the style for the table row
the code goes like this
<html>
<body>
<table>
<tr style="position:absolute; left: 100px; top: 100px;" >
<td>
val
</td>
</tr>
</table>
</body>
</html>
this works fine in internet explorer and mozilla firefox
but in netscape it is not working what could be the reason for this
thanks in advance
zeta
Maybe your example was a greatly simplified version, but wouldn't it be much simpler (and more semantically correct) to just do:
HTML Code:
<html>
<body>
<p style="position:absolute; left: 100px; top: 100px;" >
val
</p>
</body>
</html>
Or, even cleaner:
HTML Code:
<html>
<style type="text/css" >
body {
margin: 0;
padding: 0;
}
#myid {
margin-top: 100px;
margin-left: 100px;
}
</style>
<body>
<p id=myid> val</p>
</body>
</html>
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in
Nation
eBookworm.us
Oh, and if you want it to validate correctly:
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
<title> Page title</title>
<style type="text/css" >
<!--
body {
margin: 0;
padding: 0;
}
#myid {
margin-top: 100px;
margin-left: 100px;
}
-->
</style>
</head>
<body>
<p id=myid> val</p>
</body>
</html>
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in
Nation
eBookworm.us
this might work but i need to try it wilth table row itself
this is because i am using jsp datatable and i need to set style tag for each row in the data table
table row style
this might work but i need to try it wilth table row itself
this is because i am using jsp datatable and i need to set style tag for each row in the data table
this might work but i need to try it wilth table row itself
this is because i am using jsp datatable and i need to set style tag for each row in the data table
so make it a class and apply the class to the tr tag
Instead of using # use .
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
<title> Page title</title>
<style type="text/css" >
<!--
body { margin: 0; padding: 0; }
.myclass { margin-top: 100px; margin-left: 100px; }
-->
</style>
</head>
<body>
<tr class="myclass" >
<td> some content</td>
</tr>
</body>
</html>
Last edited by BeachSide; 07-02-2005 at 04:46 PM .
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks