Hello, I am trying to control the table width for the form text and input box. I can't even control the main table width with this code:

<table border="1" style="width: 10%;">

the width is still too large. I cannot make it smaller. Evenif I change the percentage or pixels into smaller one.

create_account.php

<html>
<title></title>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/styleT.css"> <!-- Resource style --><script src="js/modernizr.js"></script> <!-- Modernizr --> 
<!-- only for tabbing add-ons -->
<link rel="stylesheet" href="jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
<script>
$(function() {
$( "#tabs2" ).tabs();
});
</script>
<!-- end tabbing -->

</head>
<body>

<div id="container">
<image src="images/logo.jpg">

<div id="navigation"><!-- <img src="images/navigation bar.jpg" alt="nav bar"> --></div> 

<div id="navcontainerbar">
<ul>
<div style="margin-left: -150px;">
<li><a href="index.php">Home</a></li>
<li><a href="http://202.93.143.203/SIP_Ricci">SIP</a></li>  
<li><a href="#">LMS</a></li>
<li><a href="#">Library</a></li>
<li><a href="http://www.roomplus.co.id/roomplus/">Virtual Class</a></li>
</div>

</ul>
</div>

<image src="images/nav.jpg">

<br><br><br><br><br><br>

<center>
<form action="login.php" method="POST">
<table border="1" style="width: 10%;">
<tr>USER REGISTRATION</tr>
<tr></tr>
<tr>
<td>Nama :</td>
<td><input type="text" class="form" name="nama"></td>
</tr><br>
<tr>
<td>Institusi :</td>
<td><input type="text" class="form" name="institusi"></td>
</tr><br>
<tr><td>Alamat :</td>
<td><input type="text" class="form" name="alamat"></td>
</tr><br>
<tr><td>Email :</td>
<td><input type="text" class="form" name="email"></td>
</tr><br>
<tr><td>No_telp :</td>
<td><input type="text" class="form" name="no_telp"></td>
</tr><br>
</table>
<input type="submit" class="login" name="submit" value=""></input>
</form>
</center>

<br><br><br><br><br><br><br><br>


<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

</div>

</body>
</html>

The default width of your inputs is the problem. Specify a shorter width for all of your textboxes and you'll be able to make the table narrower. I think the default width of a text input is 20 characters if you don't specify a value and so that will be limiting how narrow your table can be.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.