I recently created two different web pages to explore the contrasting features between responsive and non-responsive designs. I specified the width and margin values in the CSS files for both pages.
Remarkably, both web pages exhibit responsive behavior effortlessly on their own.
This is the CSS code snippet:
@CHARSET "ISO-8859-1";
body {
background-color: #999999;
}
.signUp {
background-color: #2F4F4F;
margin: 40px auto;
border-radius: 5px;
max-width: 1000px;
box-shadow: 0px 0px 200px 0px #2F4F4F;
}
.rowLab {
font-size: 20px;
padding: 0px 60px 0px 0px;
}
.in {
width: 400px;
position: relative;
background-color: #2F4F4F;
padding: 5px 10px 5px 5px;
font-size: 25px;
}
.btn {
background-color: gray;
color: #2F4F4F;
padding: 10px 40px 10px 40px;
}
However, I am now looking to prevent this automatic responsiveness. Is there a way to stop the pages from resizing when I decrease the screen size?
Here is an excerpt of my HTML page:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!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>SignUp</title>
<link rel="stylesheet" href="webStyle.css">
<script type="text/javascript">
function contact() {
var a=document.getElementById("phone").value;
if(a.length!=10){
alert("Check Contact Number !!");
}
}
</script>
</head>
<body>
<div class="signUp">
<form action="DBinsert" method="get" >
<br><br>
<h1 style="font-size: 50px; color: #ffffff" align="center">Register Yourself</h1>
<br><br><br>
<table align="center">
<tr>
<td class="rowLab">First Name</td>
<td><input class="in" type="text" name="fname" required autocomplete="on"></td>
</tr>
<tr>
<td class="rowLab">Last Name</td>
<td><input class="in" type="text" name="sname" required autocomplete="on"></td>
</tr>
<tr>
<td class="rowLab">Username</td>
<td><input class="in" type="text" name="uname" required autocomplete="on"></td>
</tr>
<tr>
<td class="rowLab">Password</td>
<td><input class="in" type="password" name="pwd" required autocomplete="off"></td>
</tr>
<tr>
<td class="rowLab">Email Id</td>
<td><input class="in" type="text" name="email" required autocomplete="on"></td>
</tr>
<tr>
<td class="rowLab">Phone NO.</td>
<td><input class="in" type="text" name="phone" id="phone" onblur="contact()" required autocomplete="on"></td>
</tr>
<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
... (more table rows) ...
</table>
</form>
</div>
</body>
</html>