 |
HTML Help Please Search for the answer to your question before asking it! Thanks.
|
| View previous topic :: View next topic |
| Author |
Message |
wxzhangyao
Joined: 19 Jun 2009
Posts: 6
|
| Posted: Thu Jun 25, 2009 5:18 am how to put a frame in a table? |
|
|
Hello everybody,
Right now I have a frame which I can show the dynamic images from my network camera.
And I have a table which shows different colours for different components,just like a background file.The position for putting the camera is the first row and first column.
At first I just simply put the frame file in the "camera" area in the table file.But I can only see the layout of the table.If I put the frame file above the table file I can only see the camera frame working there.I guess the frame and table cannot compromise with each other.
Can any of you help me on this issue?Or can you help me to use only one method to show the camera image with a defined background(only table or only frame).
Thx a lot!
Here is my frame file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<html lang="en">
<head>
<title>Sample10: JPEG refresh with click centering.</title>
</head>
<frameset cols="0,*" border="0">
<frame name="Message"> <!-- This frame is not displayed and named "Message". -->
<frame src="JpegViewer.html" frameborder="0" marginheight="0" marginwidth="0" >
</frameset>
</html>
Here is my table file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PeTEX Testframe</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="74%" height="736" border="0">
<tr>
<td width="50%" height="21" bgcolor="#99FF99">Camera</td>
<td width="50%" bgcolor="#FF9966">Zwick controls</td>
</tr>
<tr>
<td height="320" bgcolor="#99FF99"> </td>
<td bgcolor="#FF9966"> </td>
</tr>
<tr>
<td height="21" bgcolor="#9999CC">Content</td>
<td bgcolor="#FFFF66">Results</td>
</tr>
<tr>
<td height="364" bgcolor="#9999CC"> </td>
<td bgcolor="#FFFF66"> </td>
</tr>
</table>
</body>
</html> |
|
|
sticks464
Joined: 31 Dec 2006
Posts: 2309
|
| Posted: Thu Jun 25, 2009 9:21 am |
|
|
I wouldn't use frames or tables. I would do it like this
test.shtml
Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test</title>
<style type="text/css">
* {
padding:0;
margin:0;
}
body {
font-family:12px Arial, Helvetica, sans-serif;
background:#fff;
text-align:center;
line-height:21px;
}
#wrapper {
width:74%;
text-align:left;
margin:10px 0 10px 10px;
}
.camera, .controls, #camera-box, #controls-box,
.content, .results, #content-box, #results-box {
width:49.8%;
text-indent:5px;
}
.camera {
background:#99FF99;
float:left;
margin-right:0.2%;
}
.controls {
background:#FF9966;
float:left;
display:inline;
}
#camera-box {
background:#99FF99;
float:left;
margin:0.2% 0.2% 0 0;
height:320px;
}
#controls-box {
background:#FF9966;
float:left;
display:inline;
height:320px;
margin-top:0.2%;
}
.content {
background:#9999CC;
float:left;
margin:0.2% 0.2% 0 0;
}
.results {
background:#FFFF66;
float:left;
display:inline;
margin:0.2% 0 0 0;
}
#content-box {
background:#9999CC;
float:left;
margin:0.2% 0.2% 0 0;
height:320px;
}
#results-box {
background:#FFFF66;
float:left;
display:inline;
margin:0.2% 0 0 0;
height:320px;
}
</style>
</head>
<body>
<div id="wrapper">
<p class="camera">Camera</p>
<p class="controls">Zwick controls</p>
<div id="camera-box">
<!--#include file="JpegViewer.html"-->
</div>
<div id="controls-box"></div>
<p class="content">Content</p>
<p class="results">Results</p>
<div id="content-box"</div>
<div id="results-box"></div>
</div>
</body>
</html>
To use the html include statement the file extension will need to be shtml.
The JpegViewer.html file should be stripped of all code except the part you want displayed in the camera-box ie. no doctype, no head section, no body tags and no html opening and closing tags. |
|
|
| |
|
|
|
Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group
|