JIT
Login Page Header Logo Login Fix
fix this, move the header to the upper-most of the page and resize the logo has half of the page and make the login space at the bottom of the logo make it fit, use this code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login</title> <link rel="stylesheet" href="login.css"> </head> <body> <!-- Login Form --> <img src="knhs.jpg" alt=""> <body> <div class="header"> Kalayaan National High School <div class="sub-header">Q2JJ+GV9, 1428 Langit Rd, Caloocan, Metro Manila</div> </div> </body> <div class="login-container" id="login-container"> <h2>Login</h2> <input type="text" id="username" placeholder="Enter Username"> <input type="password" id="password" placeholder="Enter Password"> <select id="role"> <option value="">Select Role</option> <option value="teacher">Teacher</option> <option value="student">Junior High School Student</option> <option value="parent">Parent</option> </select> <!-- Container for Teacher ID --> <div id="loginTeacherIdContainer" class="hidden"> <input type="text" id="loginTeacherId" placeholder="Enter Teacher ID Number"> </div> <!-- Container for Student ID --> <div id="loginStudentIdContainer" class="hidden"> <input type="text" id="loginStudentId" placeholder="Enter Student ID Number"> </div> <button onclick="login()">Login</button> <p id="errorMessage" class="error-message"></p> <p>Don't have an account? <a href="#" onclick="showSignup()">Sign up</a></p> </div> <!-- Sign Up Form --> <div class="signup-container hidden" id="signup-container"> <h2>Sign Up</h2> <input type="text" id="newUsername" placeholder="Choose a Username"> <input type="password" id="newPassword" placeholder="Choose a Password"> <select id="newRole"> <option value="">Select Role</option> <option value="teacher">Teacher</option> <option value="student">Junior High School Student</option> <option value="parent">Parent</option> </select> <!-- Container for Teacher ID --> <div id="signupTeacherIdContainer" class="hidden"> <input type="text" id="signupTeacherId" placeholder="Enter Teacher ID Number"> </div> <!-- Container for Student Info (Full Name and ID) --> <div id="signupStudentInfoContainer" class="hidden"> <input type="text" id="fullName" placeholder="Enter Full Name"> <input type="text" id="signupStudentId" placeholder="Enter Student ID Number"> </div> <button onclick="signup()">Sign Up</button> <p id="signupMessage" class="signup-message"></p> <p>Already have an account? <a href="#" onclick="showLogin()">Log in</a></p> </div> <script src="login.js"></script> </body> </html> /* Reset default margin and padding */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } /* Background image: Cover full screen, ensure readability */ body { background: url('knhs.jpg') no-repeat center center fixed; background-size: contain; /* Ensures full image is shown */ background-color: #ffffff; /* White fallback */ display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 10vh; text-align: center; padding: 20px; } /* Header styles */ .header { background: rgba(255, 255, 255, 0.9); padding: 15px; border-radius: 10px; width: 90%; max-width: 500px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); } .header h1 { font-size: 22px; color: #003366; /* Dark blue */ } .header p { font-size: 14px; color: #990000; /* Red */ } /* Login & Sign Up Containers */ .login-container, .signup-container { background: rgba(255, 255, 255, 0.95); padding: 25px; border-radius: 12px; width: 100%; max-width: 350px; margin-top: 20px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } /* Form Elements */ h2 { color: #003366; margin-bottom: 20px; } input, select, button { width: 100%; padding: 12px; margin: 10px 0; border-radius: 8px; border: 1px solid #ddd; font-size: 16px; } input:focus, select:focus { border-color: #990000; box-shadow: 0 0 8px rgba(153, 0, 0, 0.3); } /* Button Styles */ button { background: #990000; /* Red */ color: white; border: none; font-weight: bold; cursor: pointer; transition: background 0.3s; } button:hover { background: #cc0000; /* Lighter Red */ } /* Hidden class for dynamic elements */ .hidden { display: none; } /* Error & Signup Messages */ .error-message, .signup-message { color: red; font-size: 14px; margin-top: 10px; } /* Responsive Design */ @media (max-width: 600px) { .login-container, .signup-container { max-width: 90%; padding: 20px; } .header { width: 95%; } }

Okay, I can help you with that. I'll move the header to the top, resize the logo, and position the login form below it.

I've updated the HTML structure and CSS rules. The header is now at the top, the logo (knhs.jpg) is centered below it with a width of 50% (and a max-width to prevent it becoming too large), and the login/signup forms are positioned below the logo. Make sure the knhs.jpg image file is present in the project directory.

Updated files
v1
apply this working link (https://www.google.com/maps/place/1428+Langit+Rd,+Caloocan,+Metro+Manila/@14.781038,121.0289629,17z/data=!3m1!4b1!4m6!3m5!1s0x3397ae32ee5801f1:0x1e47dcb29763d2a!8m2!3d14.7810328!4d121.0315378!16s%2Fg%2F11f9yyzw94?authuser=0&entry=ttu&g_ep=EgoyMDI1MDMzMC4wIKXMDSoJLDEwMjExNjM5SAFQAw%3D%3D) on this code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Welcome</title> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #e2f0d9, #f4f4f4); /* Light green gradient */ display: flex; justify-content: center; align-items: center; height: 100vh; padding: 20px; text-align: center; color: #333; margin: 0; } .welcome-container { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); max-width: 500px; width: 100%; } h1 { color: #28a745; /* Green color */ margin-bottom: 15px; font-size: 28px; } p { font-size: 18px; margin-bottom: 30px; line-height: 1.6; } .dashboard-button { display: inline-block; padding: 15px 30px; background: #28a745; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 18px; font-weight: bold; text-decoration: none; transition: background 0.3s ease; } .dashboard-button:hover { background: #218838; } /* Removed .logout-button styles */ </style> </head> <body> <div class="welcome-container"> <h1 id="welcome-message">Welcome!</h1> <p>You have successfully logged in. Click the button below to proceed to your dashboard.</p> <button id="dashboard-link" class="dashboard-button">Go to Dashboard</button> <!-- Removed Logout Button --> </div> <script> document.addEventListener('DOMContentLoaded', () => { const username = sessionStorage.getItem('loggedInUsername'); const role = sessionStorage.getItem('loggedInRole'); const welcomeMessage = document.getElementById('welcome-message'); const dashboardLink = document.getElementById('dashboard-link'); // Removed reference to logoutBtn // If no user info found, redirect to login if (!username || !role) { alert('You need to log in first.'); window.location.href = 'login.html'; return; } // Personalize welcome message welcomeMessage.textContent = `Welcome, ${username}!`; // Determine dashboard URL let dashboardUrl = ''; if (role === 'teacher') { dashboardUrl = 'teacher.html'; } else if (role === 'student') { dashboardUrl = 'student.html'; } else if (role === 'parent') { dashboardUrl = 'parent.html'; } else { // Fallback if role is unexpected (redirect to login) alert('Invalid user role detected.'); sessionStorage.removeItem('loggedInUsername'); // Clear session sessionStorage.removeItem('loggedInRole'); window.location.href = 'login.html'; return; } // Set button click action dashboardLink.onclick = () => { window.location.href = dashboardUrl; }; // Removed logoutBtn.onclick assignment }); // Removed logout function </script> </body> </html>

Okay, I can add the Google Maps link to the page. I'll add it as a separate link below the "Go to Dashboard" button.

I've added a paragraph containing a link below the "Go to Dashboard" button. The link text is "View School Location on Map" and it points to the Google Maps URL you provided. It will open in a new tab (target="_blank")._

Updated files
v2
make it fill the whole screen and the login space is over it

Okay, I'll adjust the CSS to make the knhs.jpg image the full-screen background and place the login form over it, keeping the header at the top.

The index.html no longer includes the <img> tag. The login.css file now sets the knhs.jpg image as a fixed, full-screen background on the body. The header stays at the top, and the login/signup containers are centered horizontally below it with a semi-transparent background so they appear overlaid on the background image.

Updated files
v3
make the picture visible on this code using this google drive link(https://drive.google.com/file/d/1Coma9BalUjNGGmC4FTtgAcjYNoSUYd-C/view?usp=drive_link) on this code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login</title> <link rel="stylesheet" href="login.css"> </head> <body> <div class="header"> <h1>Kalayaan National High School</h1> <p>Q2JJ+GV9, 1428 Langit Rd, Caloocan, Metro Manila</p> </div> <!-- Fixed Image Source --> <img src="https://i.imgur.com/example.jpg" alt="KNHS Logo"> <!-- Login Form --> <div class="login-container" id="login-container"> <h2>Login</h2> <input type="text" id="username" placeholder="Enter Username"> <input type="password" id="password" placeholder="Enter Password"> <select id="role"> <option value="">Select Role</option> <option value="teacher">Teacher</option> <option value="student">Junior High School Student</option> <option value="parent">Parent</option> </select> <!-- Container for Teacher ID --> <div id="loginTeacherIdContainer" class="hidden"> <input type="text" id="loginTeacherId" placeholder="Enter Teacher ID Number"> </div> <!-- Container for Student ID --> <div id="loginStudentIdContainer" class="hidden"> <input type="text" id="loginStudentId" placeholder="Enter Student ID Number"> </div> <button onclick="login()">Login</button> <p id="errorMessage" class="error-message"></p> <p>Don't have an account? <a href="#" onclick="showSignup()">Sign up</a></p> </div> <!-- Sign Up Form --> <div class="signup-container hidden" id="signup-container"> <h2>Sign Up</h2> <input type="text" id="newUsername" placeholder="Choose a Username"> <input type="password" id="newPassword" placeholder="Choose a Password"> <select id="newRole"> <option value="">Select Role</option> <option value="teacher">Teacher</option> <option value="student">Junior High School Student</option> <option value="parent">Parent</option> </select> <!-- Container for Teacher ID --> <div id="signupTeacherIdContainer" class="hidden"> <input type="text" id="signupTeacherId" placeholder="Enter Teacher ID Number"> </div> <!-- Container for Student Info (Full Name and ID) --> <div id="signupStudentInfoContainer" class="hidden"> <input type="text" id="fullName" placeholder="Enter Full Name"> <input type="text" id="signupStudentId" placeholder="Enter Student ID Number"> </div> <button onclick="signup()">Sign Up</button> <p id="signupMessage" class="signup-message"></p> <p>Already have an account? <a href="#" onclick="showLogin()">Log in</a></p> </div> <script src="login.js"></script> </body> </html> /* Reset default margin and padding */ * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; /* Ensure html and body take full height */ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } /* Body layout - Fullscreen background */ body { background: url('knhs.jpg') no-repeat center center fixed; background-size: cover; display: flex; flex-direction: column; /* Stack header and login vertically */ align-items: center; /* Center login container horizontally */ justify-content: flex-start; /* Align header to top */ min-height: 100vh; /* Ensure it covers viewport height */ padding: 0; /* Remove padding */ text-align: center; } /* Ensure full-page background */ body { background: url('school.jpg') no-repeat center center fixed; background-size: cover; display: flex; flex-direction: column; /* Stack header and login vertically */ align-items: center; /* Center login container horizontally */ justify-content: flex-start; /* Align header to top */ min-height: 100vh; /* Ensure it covers viewport height */ padding: 0; text-align: center; } /* Header styles - Full width at the top */ .header { width: 100%; background: rgba(0, 51, 102, 0.85); /* Dark blue, semi-transparent */ color: white; padding: 15px 20px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); text-align: center; /* order: -1; /* Ensures header is visually first (already first in HTML) */ } #logo { width: 200px; /* Adjust size as needed */ height: auto; /* Maintain aspect ratio */ display: block; margin: 10px auto; /* Center the logo */ } .header h1 { font-size: 35px; /* Slightly smaller */ color: white; margin-bottom: 5px; } .header p { font-size: 14px; color: #ddd; /* Lighter text for address */ margin: 0; } /* Login & Sign Up Containers - Positioned over the background */ .login-container, .signup-container { background: rgba(255, 255, 255, 0.95); /* Semi-transparent white */ padding: 30px; /* More padding */ border-radius: 12px; width: 90%; /* Responsive width */ max-width: 400px; /* Slightly wider max width */ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* Stronger shadow */ margin-top: 5vh; /* Space below header */ margin-bottom: 5vh; /* Space from bottom */ } /* Form Elements */ h2 { color: #003366; /* Dark blue */ margin-bottom: 25px; /* More space below heading */ } input, select, button { width: 100%; padding: 12px; margin: 12px 0; /* Slightly more margin */ border-radius: 8px; border: 1px solid #ccc; /* Lighter border */ font-size: 16px; } input:focus, select:focus { outline: none; /* Remove default outline */ border-color: #990000; /* Red border on focus */ box-shadow: 0 0 8px rgba(153, 0, 0, 0.3); /* Red glow on focus */ } /* Button Styles */ button { background: #990000; /* Red */ color: white; border: none; font-weight: bold; cursor: pointer; transition: background 0.3s ease; padding: 14px; /* Larger button */ } button:hover { background: #cc0000; /* Lighter Red */ } /* Links */ a { color: #0056b3; /* Darker blue link */ text-decoration: none; font-weight: 500; } a:hover { text-decoration: underline; } /* Hidden class for dynamic elements */ .hidden { display: none; } /* Error & Signup Messages */ .error-message, .signup-message { color: red; font-size: 14px; margin-top: 10px; min-height: 1em; /* Reserve space even when empty */ font-weight: 500; } /* Responsive Design */ @media (max-width: 600px) { .header h1 { font-size: 18px; } .header p { font-size: 12px; } .login-container, .signup-container { width: 95%; max-width: 95%; /* Allow it to take more width on small screens */ padding: 20px; margin-top: 3vh; margin-bottom: 3vh; } input, select, button { padding: 10px; font-size: 14px; margin: 10px 0; } h2 { font-size: 20px; margin-bottom: 20px; } }

Okay, I can update the CSS to use the image from the Google Drive link as the background. However, direct linking from Google Drive for website backgrounds can be unreliable and might not work consistently because Google Drive isn't designed as a content delivery network (CDN). It's generally better to host the image elsewhere (like Imgur, Cloudinary, or your own web server) for this purpose.

If you still want to try the Google Drive link, we need to modify it slightly to get a more direct link.

Here's the updated code using the modified Google Drive link for the background and removing the unnecessary <img> tag:

<jitProject id="login-page-gdrive-bg" title="Login Page Google Drive Background"> <jitFile type="file" filePath="index.html"> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login</title> <link rel="stylesheet" href="login.css"> </head> <body> <div class="header"> <h1>Kalayaan National High School</h1> <p>Q2JJ+GV9, 1428 Langit Rd, Caloocan, Metro Manila</p> </div>
    <!-- Removed the img tag as the image is now the background -->

    <!-- Login Form -->
    <div class="login-container" id="login-container">
        <h2>Login</h2>
        <input type="text" id="username" placeholder="Enter Username">
        <input type="password" id="password" placeholder="Enter Password">
        <select id="role">
            <option value="">Select Role</option>
            <option value="teacher">Teacher</option>
            <option value="student">Junior High School Student</option>
            <option value="parent">Parent</option>
        </select>
        <!-- Container for Teacher ID -->
        <div id="loginTeacherIdContainer" class="hidden">
            <input type="text" id="loginTeacherId" placeholder="Enter Teacher ID Number">
        </div>
        <!-- Container for Student ID -->
        <div id="loginStudentIdContainer" class="hidden">
            <input type="text" id="loginStudentId" placeholder="Enter Student ID Number">
        </div>
        <button onclick="login()">Login</button>
        <p id="errorMessage" class="error-message"></p>
        <p>Don't have an account? <a href="#" onclick="showSignup()">Sign up</a></p>
    </div>

    <!-- Sign Up Form -->
    <div class="signup-container hidden" id="signup-container">
        <h2>Sign Up</h2>
        <input type="text" id="newUsername" placeholder="Choose a Username">
        <input type="password" id="newPassword" placeholder="Choose a Password">
        <select id="newRole">
            <option value="">Select Role</option>
            <option value="teacher">Teacher</option>
            <option value="student">Junior High School Student</option>
            <option value="parent">Parent</option>
        </select>
        <!-- Container for Teacher ID -->
        <div id="signupTeacherIdContainer" class="hidden">
            <input type="text" id="signupTeacherId" placeholder="Enter Teacher ID Number">
        </div>
        <!-- Container for Student Info (Full Name and ID) -->
        <div id="signupStudentInfoContainer" class="hidden">
            <input type="text" id="fullName" placeholder="Enter Full Name">
            <input type="text" id="signupStudentId" placeholder="Enter Student ID Number">
        </div>
        <button onclick="signup()">Sign Up</button>
        <p id="signupMessage" class="signup-message"></p>
        <p>Already have an account? <a href="#" onclick="showLogin()">Log in</a></p>
    </div>

    <script src="login.js"></script>
</body>
</html>
</jitFile> <jitFile type="file" filePath="login.css"> /* Reset default margin and padding */ * { margin: 0; padding: 0; box-sizing: border-box; }
html, body {

*

Updated files
v4
give me the css code that will appear the picture on the link i sent to you

Okay, here is the updated login.css file using the modified Google Drive link for the background image.

Important Note: Using Google Drive links directly for website backgrounds can be unreliable and might stop working without notice. Google Drive is not designed as a Content Delivery Network (CDN). For better reliability, it's recommended to host the image on a dedicated image hosting service (like Imgur, Cloudinary) or your web server.

This CSS code sets the background of the body element to the image specified by the modified Google Drive link. It ensures the image covers the entire background, is fixed in place, and centered. The rest of the styles position the header and login/signup forms correctly over this background.

Updated files
v5
it doesnt show

You're right, it often doesn't work reliably using Google Drive links directly in CSS like that. Google Drive isn't designed as a web host or Content Delivery Network (CDN), and it has mechanisms in place that often prevent images from being displayed when linked directly from CSS background-url. The link might require authentication or change over time.

The Best Solution:

  1. Upload the image: Upload your knhs.jpg (or the image from the Drive link) to a dedicated image hosting service like:
    • Imgur
    • Cloudinary (offers a generous free tier)
    • Or include it directly in your project files if your development environment allows.
  2. Get the Direct Link: After uploading, get the direct link to the image (usually ending in .jpg, .png, etc.).
  3. Update the CSS: Replace the Google Drive URL in your login.css file with this new direct link.

Example CSS using a placeholder image (replace the URL with your actual image link once uploaded):

Once you upload your image to a service like Imgur and get the direct link (e.g., https://i.imgur.com/your_image_id.jpg), replace the placeholder URL (https://picsum.photos/1920/1080) in the background: url(...) line with your actual image link. That should make the background visible.*

Updated files
v6
fix this it does not appear: /* Reset default margin and padding */ * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; /* Ensure html and body take full height */ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } /* Body layout - Fullscreen background using Google Drive link */ body { /* Modified Google Drive link for direct access */ background: url('https://imgur.com/FEUguVt') no-repeat center center fixed; background-size: cover; display: flex; flex-direction: column; /* Stack header and login vertically */ align-items: center; /* Center login container horizontally */ justify-content: flex-start; /* Align header to top */ min-height: 100vh; /* Ensure it covers viewport height */ padding: 0; /* Remove padding */ text-align: center; } /* Header styles - Full width at the top */ .header { width: 100%; background: rgba(0, 51, 102, 0.85); /* Dark blue, semi-transparent */ color: white; padding: 15px 20px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); text-align: center; } .header h1 { font-size: 20px; /* Adjusted from previous example */ color: white; margin-bottom: 5px; } .header p { font-size: 14px; color: #ddd; /* Lighter text for address */ margin: 0; } /* Login & Sign Up Containers - Positioned over the background */ .login-container, .signup-container { background: rgba(255, 255, 255, 0.95); /* Semi-transparent white */ padding: 30px; /* More padding */ border-radius: 12px; width: 90%; /* Responsive width */ max-width: 400px; /* Slightly wider max width */ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* Stronger shadow */ margin-top: 5vh; /* Space below header */ margin-bottom: 5vh; /* Space from bottom */ } /* Form Elements */ h2 { color: #003366; /* Dark blue */ margin-bottom: 25px; /* More space below heading */ } input, select, button { width: 100%; padding: 12px; margin: 12px 0; /* Slightly more margin */ border-radius: 8px; border: 1px solid #ccc; /* Lighter border */ font-size: 16px; } input:focus, select:focus { outline: none; /* Remove default outline */ border-color: #990000; /* Red border on focus */ box-shadow: 0 0 8px rgba(153, 0, 0, 0.3); /* Red glow on focus */ } /* Button Styles */ button { background: #990000; /* Red */ color: white; border: none; font-weight: bold; cursor: pointer; transition: background 0.3s ease; padding: 14px; /* Larger button */ } button:hover { background: #cc0000; /* Lighter Red */ } /* Links */ a { color: #0056b3; /* Darker blue link */ text-decoration: none; font-weight: 500; } a:hover { text-decoration: underline; } /* Hidden class for dynamic elements */ .hidden { display: none; } /* Error & Signup Messages */ .error-message, .signup-message { color: red; font-size: 14px; margin-top: 10px; min-height: 1em; /* Reserve space even when empty */ font-weight: 500; } /* Responsive Design */ @media (max-width: 600px) { .header h1 { font-size: 18px; } .header p { font-size: 12px; } .login-container, .signup-container { width: 95%; max-width: 95%; /* Allow it to take more width on small screens */ padding: 20px; margin-top: 3vh; margin-bottom: 3vh; } input, select, button { padding: 10px; font-size: 14px; margin: 10px 0; } h2 { font-size: 20px; margin-bottom: 20px; } }

You're almost there! The link https://imgur.com/FEUguVt is the link to the Imgur page containing the image, not the direct link to the image file itself.

You need to use the direct image link, which usually starts with i.imgur.com and ends with the file extension (like .jpg, .png, .jpeg).

Here's the corrected CSS:

I replaced url('https://imgur.com/FEUguVt') with url('https://i.imgur.com/FEUguVt.jpeg'). This direct link should now display the background image correctly.

Updated files
v7