Curious about the level of responsiveness?

I have a project for my school where I need to create a website. I have completed most of it, but I am unsure how to make everything responsive as our teacher specified that we cannot use bootstrap. Unfortunately, I missed the only lesson about it.

The main site and its 8 subpages all have the same structure, so if I can figure out how to style one page, the rest should be easy to do. Some of the text is in Polish, so please disregard it as it contains information from Wikipedia.

This is my main site:

<!DOCTYPE HTML>
<html lang="pl">
<head>
    <meta charset="utf-8" />
    <title>Discover Dinosaurs </title>
    <meta name="description" content="A website dedicated to dinosaurs. Learn everything you want to know about these mighty reptiles!" />
    <meta name="keywords" content="dinosaurs, dino" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <link rel="stylesheet" href="style.css" type="text/css" />
    <link href="https://fonts.googleapis.com/css?family=Black+Ops+One|Caveat+Brush|Montserrat" rel="stylesheet"> 
    <link href="css/fontello.css" rel="stylesheet" type="text/css" />

</head>

<body>

    <div id="container">

        <div id="logo">
            Discover Dinosaurs
        </div>

        <div id="menu">
            <div class="option"> <a href="index.html" title="Home Page">Home</a><br></div>
            <div class="option"> <a href="1.html" title="Etymology">Etymology</a><br></div>
            <div class="option"> <a href="2.html" title="Phylogenetic Definition">Phylogenetic Definition</a><br></div>
            <div class="option"> <a href="3.html" title="Biology">Biology</a><br></div>
            <div class="option"> <a href="4.html" title="Extinction">Rise of Birds</a><br></div>
            <div class="option"> <a href="5.html" title="Bibliography">Extinction</a><br></div>
            <div class="option"> <a href="6.html" title="Rise of Birds">History of Research</a><br></div>
            <div class="option"> <a href="7.html" title="History of Research">Contact</a><br></div><br>


            <div style="clear:both;"></div>
        </div>

        <div id="topbar">
            <div id="topbarL">
                D
            </div>
            <div id="topbarR">
                <span class="bigtitle2">A Few Words About the Project</span>
                <div style="height: 15px;"></div>
                The project was created from scratch by Marcin Galos from 3b-1 as part of the Websites and Internet Applications course until the end of April 2019.
                <br><br>
                All information is sourced from <a href="https://en.wikipedia.org/wiki/Dinosaurs" title="Wikipedia">Wikipedia</a>.


            </div>
            <div id="dino">



            </div>
            <div style="clear:both;"></div>
        </div>

        <div id="sidebar">

                <div class="Gallery"> <a href="8.html" title="Home Page">Gallery</a><br></div>

                <br><br>


            <div class="socials">
                <div class="socialdivs">
                    <div class="fb">
                        <i class="icon-facebook"></i>
                    </div>
                    <div class="yt">
                        <i class="icon-youtube"></i>
                    </div>
                    <div class="t...

To ensure responsiveness, consider adding media queries to your CSS code based on different screen sizes. Break down the layout into multiple columns for smaller screens and adjust font sizes and padding accordingly. You may also need to adjust image sizes and positioning to fit different device resolutions. Testing your site on various devices and adjusting the CSS as needed will help achieve a responsive design.

Answer №1

Your CSS currently specifies margin, padding, height, and width using pixel values, which do not adjust when the screen size changes.

If you use percentage values instead, these properties will scale according to the screen size.

This is a simple way to create a responsive website without relying on bootstrap.

For example, if your screen's width is 2000px and you have an element with a width of 200px, you can calculate the percentage and update the CSS accordingly.

Change width: 200px; to width: 10%;

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to input an HTML element into AngularJS code?

I am looking to integrate the html element into my angularjs code. Within my HTML, I have elements such as data-form-selector='#linechart_general_form' and data-url="{% url 'horizon:admin:metering:samples'%}" that I need to access withi ...

Steps for activating mouse dragging in a div that supports drag and drop functionality

I have a div containing multiple elements, and I need the ability to drag and drop the entire div with the attribute draggable=true. However, one of the elements in the div is a bar graph that allows users to select a specific range by dragging their mouse ...

Sending data through URL links in HTML

$.post("/diabetes/ropimages/getcount.php",{patientId:$("#patient_id").val()} ,function(data1){ //alert(data1); var count = data1; var patientId = $("#patient_id").val(); var reportId; for( var i = 1 ; i <= count ; i++) { var imageLink =&a ...

Angular conditional operator: running a series of statements

Let's break down the logic: When the enter key is pressed, we want to execute the following conditional statement: if (!elementB.isOpen) { elementB.open(); } else { elementC.open(); elementC.focus(); elementB.close(); } I attempted ...

The hamburger symbol on my website is failing to show the menu options

I'm having trouble getting my burger icon to display the navigation menu on mobile devices. I've tried adjusting functions in my JavaScript and tweaking the media queries in my CSS file, but the menu still won't show up when the page size is ...

Position the Crossmark to align with text using CSS styling

How can I properly align a crossmark and a checkmark with the text behind them? The checkmark looks aligned well, but the crossmark appears to be slightly off to the top-right. I'm hesitant to adjust margins and paddings as it may cause issues when th ...

Create a mobile-friendly version of the website that retains all the functionality and features of the desktop

Currently, I am in the process of optimizing my website for mobile devices. However, creating a separate subdomain and folder for a new mobile version is proving to be a challenge since it was not originally requested. How can I ensure that the website ap ...

Is there a way to enlarge images when hovered using canvas?

I came across a fascinating example at the following link: , where the images expand when hovered over. I am aware that this can be achieved using jquery, but I have concerns about its speed and reliability. I would like to experiment with d3.js, although ...

Issues with form submission and JavaScript functionality have been detected in Internet Explorer, Firefox, and Safari, but are functioning properly in Chrome

Hey there! I've encountered a puzzling issue with a form I've created. It's programmed to determine the next page to redirect to using JavaScript after submission. Oddly enough, everything functions perfectly when I test it out in my IDE (C ...

Is it possible to append an attribute to input descendants of hidden elements using jQuery?

I'm facing a challenge with JQuery that I can't seem to overcome. As someone who is not very familiar with JQuery, I believe I may have gone about this the wrong way. Within my large form, there are certain conditions that dictate whether specif ...

Setting a maximum value for an input type date can be achieved by using the attribute max="variable value"

Having trouble setting the current date as the "max" attribute value of an input field, even though I can retrieve the value in the console. Can anyone provide guidance on how to populate the input field with the current date (i.e max="2018-08-21")? var ...

Rearrange DIV elements by clicking a button that redirects you to a different webpage

Consider a scenario with two distinct pages: website.com/page1 website.com/page2 Page 1 contains multiple buttons, each leading to Page 2. On Page 2, there are various content sections (divs). Is there a straightforward meth ...

Retrieving the height of the HTML body once all data has finished loading in AngularJS

Trying to determine the height of the HTML document (body) after loading content from a service using AngularJS. /* DISPLAY RECENT POSTS */ app.controller('RecentPostsController', function ($scope, $http) { $http.get("/site/recentpostsjs ...

Verifying the status of a checkbox label in Java using Selenium

I am currently working on an automation project using Selenium and I'm struggling to figure out how to check the status of a checkbox input. Has anyone else encountered this issue before? Here is a sample code snippet in JavaScript with jQuery: $("i ...

What is the best way to rearrange the sequence of Bootstrap columns?

Looking to switch up the column order in Bootstrap 4's flexbox grid system? Here's the current code: <div class="contents"> <div class="row row-1"> <div class="col-sm-6">Content Left</div& ...

Is there a way to create a smooth transition for a background image, starting from grayscale and gradually transitioning to

I have a Bootstrap website featuring a colored background image. I am looking to achieve a specific effect where the image begins in grayscale and slowly transitions into color as the page loads, without requiring any user interaction. How can I accomplis ...

What is the best way to show the selected values of dropdown and checkboxes on a redirected page for confirmation using PHP?

<form action="action.php" method="POST" target="_self"> <table class="main" border="1" height="100%" align="center">t; <h3> <p id="id1" style="background-color: #9FF" >Registration form</p></h3> <tr><t ...

"Applying CSS styles to highlighted text using jQuery - how can I do it

Struggling to style selected text with CSS? Here's what I've tried so far without success in Firefox. $(document).keyup(function(){ savedRange = selection.getRangeAt(0); $(savedRange).wrap('<span style="color:red"></span>' ...

Is swapping out a form input's outline with box-shadow considered a violation of any WCAG guidelines?

Query Are there any accessibility drawbacks to removing the outline CSS property and using box-shadow instead to highlight an active input? Does this approach violate WCAG guidelines? Context By default, user agents highlight an active element's ou ...

Looking to retrieve just your Twitter follower count using JavaScript and the Twitter API V1.1?

I am trying to retrieve my Twitter follower count using JavaScript/jQuery in the script.js file and then passing that value to the index.html file for display on a local HTML web page. I will not be hosting these files online. I have spent weeks searching ...