@@ -14,7 +14,7 @@ <h1 class="text-2xl font-bold mb-4">🧮 Subnet-Calculator</h1>
14
14
< div class ="flex items-center ">
15
15
< input type ="text " id ="ipv4 " name ="ipv4 " value ="192.168.1.1 " class ="shadow appearance-none border rounded w-4/5 py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-white border-gray-600 " oninput ="calculateSubnet(event) ">
16
16
< label class ="ml-2 " for ="ipClassValue "> Class:</ label >
17
- < input type ="text " id ="ipClassValue " name ="ipClass " disabled class ="shadow appearance-none border rounded w-1/5 py-2 px-3 leading-tight focus:outline-none focus:shadow-outline text-center ml-1 bg-gray-800 text-white border-gray-600 " value ="">
17
+ < input type ="text " id ="ipClassValue " name ="ipClass " disabled class ="shadow appearance-none border rounded w-1/5 py-2 px-3 leading-tight focus:outline-none focus:shadow-outline text-center ml-1 bg-gray-800 text-gray-400 border-gray-600 " value ="">
18
18
</ div >
19
19
< br >
20
20
@@ -25,19 +25,19 @@ <h1 class="text-2xl font-bold mb-4">🧮 Subnet-Calculator</h1>
25
25
</ div > < br >
26
26
27
27
< label for ="net-id "> Net ID:</ label >
28
- < input type ="text " id ="net-id " name ="net-id " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-white border-gray-600 "> < br > < br >
28
+ < input type ="text " id ="net-id " name ="net-id " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-gray-400 border-gray-600 "> < br > < br >
29
29
30
30
< label for ="broadcast "> Broadcast:</ label >
31
- < input type ="text " id ="broadcast " name ="broadcast " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-white border-gray-600 "> < br > < br >
31
+ < input type ="text " id ="broadcast " name ="broadcast " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-gray-400 border-gray-600 "> < br > < br >
32
32
33
33
< label for ="host-addresses "> Number of Host Addresses:</ label >
34
- < input type ="text " id ="host-addresses " name ="host-addresses " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-white border-gray-600 "> < br > < br >
34
+ < input type ="text " id ="host-addresses " name ="host-addresses " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-gray-400 border-gray-600 "> < br > < br >
35
35
36
36
< label for ="subnets "> Number of Subnets:</ label >
37
- < input type ="text " id ="subnets " name ="subnets " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-white border-gray-600 "> < br > < br >
37
+ < input type ="text " id ="subnets " name ="subnets " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-gray-400 border-gray-600 "> < br > < br >
38
38
39
39
< label for ="subnet-id "> Subnet ID:</ label >
40
- < input type ="text " id ="subnet-id " name ="subnet-id " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-white border-gray-600 "> < br > < br >
40
+ < input type ="text " id ="subnet-id " name ="subnet-id " disabled class ="shadow appearance-none border rounded w-full py-2 px-3 leading-tight focus:outline-none focus:shadow-outline bg-gray-800 text-gray-400 border-gray-600 "> < br > < br >
41
41
</ form >
42
42
43
43
< button id ="generate-table-button " class ="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline " type ="button ">
@@ -236,7 +236,7 @@ <h1 class="text-2xl font-bold mb-4">🧮 Subnet-Calculator</h1>
236
236
table . appendChild ( thead ) ;
237
237
238
238
const tbody = document . createElement ( "tbody" ) ;
239
- tbody . className = "text-sm text-gray-500 " ;
239
+ tbody . className = "text-sm text-gray-400 " ;
240
240
241
241
const numSubnets = Math . pow ( 2 , subnetMask - minSubnet ) ;
242
242
@@ -332,6 +332,8 @@ <h1 class="text-2xl font-bold mb-4">🧮 Subnet-Calculator</h1>
332
332
333
333
table . appendChild ( tbody ) ;
334
334
tableContainer . appendChild ( table ) ;
335
+
336
+ table . scrollIntoView ( { behavior : 'smooth' , block : 'start' } ) ;
335
337
}
336
338
337
339
generateTableButton . addEventListener ( "click" , generateSubnetTable ) ;
0 commit comments