Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

specify x and y axis

Status
Not open for further replies.

codehoper

Programmer
May 14, 2001
13
0
0
US
My customer has requested a site that will be center aligned with a horizontal drop down menus. The width of the site will fit in 800x600 and stay centered as the browser window expands. A problem that I am having is that I cannot control the users browser width. Is there a way to maintain where the x and y axis 0 point is so that no matter what the users widow size is the drop downs stay in the same place?
 
This low-tech solution works in IE (6) and Mozilla Firebird (0.7):

Code:
<html>
	<body> 
		<table style=&quot;width:100%; height:100%&quot;><tr><td align=&quot;center&quot;>
			<select><option value=&quot;1&quot;>First<option value=&quot;2&quot;>Second<option value=&quot;3&quot;>Third</select>  
			<select><option value=&quot;1&quot;>First<option value=&quot;2&quot;>Second<option value=&quot;3&quot;>Third</select><br> <br>
			<select><option value=&quot;1&quot;>First<option value=&quot;2&quot;>Second<option value=&quot;3&quot;>Third</select>  
			<select><option value=&quot;1&quot;>First<option value=&quot;2&quot;>Second<option value=&quot;3&quot;>Third</select>	
		</td></tr></table>                                                                                  
	</body>
</html>

Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Another LoTech solution can be:

Code:
<HTML>
<HEAD>
  <TITLE>CENTERED CONTENTS CELL</TITLE>
</HEAD>
<BODY LEFTMARGIN=&quot;0&quot; TOPMARGIN=&quot;0&quot; RIGHTMARGIN=&quot;0&quot; BOTTOMMARGIN=&quot;0&quot;>
  <TABLE BORDER=&quot;1&quot; CELLSPACING=&quot;0&quot; CELLPADDING=&quot;0&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; STYLE=&quot;table-layout:fixed;&quot;>
    <TR HEIGHT=&quot;25&quot;>
      <TD ROWSPAN=&quot;3&quot;>
          <!-- expanding/collapsing row  -->
      </TD>
      <TD WIDTH=&quot;800&quot;>
        MENU : 
        <SELECT>
          <OPTION VALUE=&quot;item1&quot;>A menu
          <OPTION VALUE=&quot;item2&quot;>Another
          <OPTION VALUE=&quot;item3&quot;>The third
        </SELECT>  
      </TD>
      <TD ROWSPAN=&quot;3&quot;>
          <!-- expanding/collapsing row  -->
      </TD>
    </TR>
    <TR>
      <TD VALIGN=&quot;TOP&quot;>
        My Contents
      </TD>
    </TR>
    <TR HEIGHT=&quot;25&quot;>
      <TD>
        My Footer ...
      </TD>
    </TR>
  </TABLE>
</BODY>
</HTML>

... this one works in IE6 (possibly in other browsers as well).

Good Luck §;O)


Jakob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top