Connecting Tech Pros Worldwide Help | Site Map

Show table at div top 100 left 100 position

Member
 
Join Date: Apr 2007
Location: india
Posts: 111
#1: Jun 7 '08
Hi All

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3.  <HEAD>
  4.   <TITLE> New Document </TITLE>
  5.  
  6.  </HEAD>
  7.  <style type="text/css">
  8. #map {
  9.     height:500px;
  10.     width:800px;
  11.     border:#999 solid 1px;
  12.     /* background-image:url("test_map.jpg");*/ /*replace name with your image*/
  13.     background-repeat:no-repeat;
  14. }
  15. </style>
  16. <script type="text/javascript">
  17. window.onload = function() {
  18.     document.getElementById("map").style.backgroundPosition="100px 100px";
  19. }
  20. </script>
  21.  <BODY>
  22.  
  23.   <div id ="map" class="drag">
  24.   <table>
  25.     <tr><td>First Image</td><td>second image</td></tr>
  26.     <tr><td>Third Image</td><td>fourth image</td></tr>
  27.     <tr><td>fifth Image</td><td>sixth image</td></tr>
  28.   </table>
  29.   </div>
  30.  </BODY>
  31. </HTML>
my table should be show in div tag at particular position

this is my code

this is not working. Currently my table show at top of the div. but my requirement is my table show at div top 100 left 100 position

pls guide me
Member
 
Join Date: Dec 2007
Posts: 44
#2: Jun 7 '08

re: Show table at div top 100 left 100 position


try to use style for your <div>

style=" left: 100px; top: 100px;"


thanks
veenna
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#3: Jun 7 '08

re: Show table at div top 100 left 100 position


More a CSS problem - moved to HTML/CSS forum.

Set the top/left properties for the table, not the div and position it relatively.
Member
 
Join Date: Apr 2007
Location: india
Posts: 111
#4: Jun 20 '08

re: Show table at div top 100 left 100 position


Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3.  <HEAD>
  4.   <TITLE> New Document </TITLE>
  5.  
  6.  </HEAD>
  7.  <style type="text/css">
  8. #map {
  9.     height:500px;
  10.     width:800px;
  11.     border:#999 solid 1px;
  12.     /* background-image:url("test_map.jpg");*/ /*replace name with your image*/
  13.     background-repeat:no-repeat;
  14. }
  15. </style>
  16. <script type="text/javascript">
  17. window.onload = function() {
  18.     document.getElementById("map").style.backgroundPosition="100px 100px";
  19. }
  20. </script>
  21.  <BODY>
  22.  
  23.   <div id ="map" class="drag">
  24.   <table>
  25.     <tr><td>First Image</td><td>second image</td></tr>
  26.     <tr><td>Third Image</td><td>fourth image</td></tr>
  27.     <tr><td>fifth Image</td><td>sixth image</td></tr>
  28.   </table>
  29.   </div>
  30.  </BODY>
  31. </HTML>

my table should be show in div tag at particular position

this is my code

this is not working. Currently my table show at top of the div. but my requirement is my table show at div top 100 left 100 position

pls guide me
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#5: Jun 20 '08

re: Show table at div top 100 left 100 position


Threads merged. Your thread had already been moved here. There was no need to start another one. Have you tried what I suggested in post #3?
Member
 
Join Date: Apr 2007
Location: india
Posts: 111
#6: Jun 24 '08

re: Show table at div top 100 left 100 position


Hi

pls give some samples
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#7: Jun 24 '08

re: Show table at div top 100 left 100 position


It's quite self-explanatory:
Expand|Select|Wrap|Line Numbers
  1. #map table {
  2.     top: 100px;
  3.     left: 100px;
  4.     position:relative;
  5. }
  6.  
Reply