responsive full-screen navigation bar, combined with an image and text elements

I am completely new to Front end development, and this is my very first client project where I could really use some assistance.

Could someone please guide me on how to ensure that everything on the website is responsive for mobile and tablet devices?

Below is a snippet of the code:

const Header = () => {
    return(
        <div className="cont fw9 f3 ">
            <div className=" topbar">
             <img className="top-logo grow" src={logo} alt="logo" />
                <Navbar  expand="sm" className="list ">
                     <Nav.Link  href="#home"> Home </Nav.Link>
                     <Nav.Link  href="#features">About Us</Nav.Link>
                     <Nav.Link  href="#pricing">Services</Nav.Link>
                     <Nav.Link  href="#tt">Our Team</Nav.Link>
                     <Nav.Link  href="#tt">Sustainability</Nav.Link>
                     <Nav.Link  href="#rr">Become an investor</Nav.Link>
                     <Nav.Link  href="#dd">Contact</Nav.Link>                  
                </Navbar> 
            </div>
              <div className=" header-main" >
                <p className="header-title b dark-blue"> INTEGRATED COLD CHAIN</p>
                <p className="header-sec f5  i black b "> Ifria is an Integrated Cold Chain Company in North and West African markets. Ifria’s mission is to develop new, modern and efficient perishable product storage capacities that can more efficiently serve the growing and rapidly changing needs of the Panafrican markets. </p>
              </div>
        </div>

Here is the accompanying CSS:

.cont {
  animation: animate 15s  infinite;
  height: 800px;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@keyframes animate{
  0%,100%{
    background-image: url(../Images/bg.png);
  }
  25%{
    background-image: url(../Images/bg2.png);
  }
  50%{
    background-image: url(../Images/bg3.png);
  }
}

.topbar{
  display: flex;
  justify-content: flex-end;
  flex-direction: row;
  align-content: flex-start;
  height: 130px;

}

.list{
  height: 100px;
  justify-content: flex-end;
}

.top-logo{
  display: flex;
  position: absolute;
  top:50px;
  left: 90px;
}

 .nav-link{
    font-family: 'Roboto';
    font-size: 18px;
    color: black !important;
  }
  .nav-link:hover {
  transform: scale(1.1); 

}

.header-main{
  position: absolute;
  right: 0px;
  height: 300px;
  width: 700px;
  top: 300px;
  flex-direction: column;
}

.header-title{
    font-size: 45px;
}

.header-sec{

}

If anyone can provide any feedback on possible errors or point me towards resources to learn more about developing responsive websites, I would greatly appreciate it. I have tried watching numerous YouTube videos, but they haven't been as helpful as I had hoped.

Answer №1

To achieve responsive web design, there are a variety of options available to cater to your project's specific needs and requirements:

Bootstrap : One popular option is Bootstrap, an HTML, CSS, and JavaScript framework known for creating responsive, mobile-first websites. While it is free to use, be cautious of the bundle size which can impact loading times, adding approximately 60.9kB extra when minified. https://getbootstrap.com/docs/4.6/getting-started/introduction/

Zurb foundation : Similar to Bootstrap, Zurb Foundation offers similar features with a smaller file size. Minified, it only adds 181bytes, making it a lightweight alternative. Although not as widely used, it effectively addresses responsive design challenges.

For responsive front-end frameworks, consider utilizing CSS properties that enhance performance and reduce application size, such as:

  1. CSS FLEXBOX https://www.w3schools.com/css/css3_flexbox_container.asp

  2. CSS GRID https://www.w3schools.com/css/css_grid.asp

  3. CSS Media query https://www.w3schools.com/css/css_rwd_mediaqueries.asp https://www.w3schools.com/cssref/css3_pr_mediaquery.asp

Explore these reference links to better understand the nuances and make informed decisions:

Additionally, informative video tutorials can aid in enhancing your skills:

Opt for the ideal solution over the simplest one, as long-term benefits are crucial for handling larger projects. Best of luck!

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

Tips for effectively passing parameters to a function that has been converted from a custom hook

A custom hook is in place that triggers two actions in the Redux slice named "myTestSlice" - action1 and action2. Each action is followed by a reducer function to obtain the new state. const useSetMyObjects = ( actions, { object1Name, object1Id, ob ...

Checkbox validation malfunctioning

I'm currently working on a attendance management project and one of the forms includes multiple checkboxes. I want to ensure that at least one checkbox is checked before the form can be submitted. I attempted to use Javascript for this, however, the i ...

Attempting to simulate a camera shutter effect using div elements

I've been attempting to create a circular camera shutter, but I'm facing difficulties in making it look accurate. This is the desired outcome: https://i.sstatic.net/oS7gT.jpg The first 'petal' should be positioned lower than the last ...

How can I establish the conversion from pixels to em units?

According to a source I found, 1 em is equivalent to 16px. You can read more about it here. Despite setting the font-size to 100% in the body and using font-size: 1em, the standard font size in my Jekyll site remains 12px. Curious? Visit my Jekyll site a ...

jQuery 'if' condition not getting detected

My jQuery code is not recognizing an if statement. You can check out the CodePen link here. On my site, I have 4 page transitions - page right, page left, page up, and page down. The contact page is hidden beneath the main hero sections and appears with t ...

Django causing CSS issues following the utilization of an if statement

I have been working on adding a dropdown list to my navbar, which I created using Bootstrap. However, whenever I place the dropdown menu inside an if statement for looping categories into a list, it seems to be breaking the CSS. Check out the navbar witho ...

Creating unique buttons for your PHP poll

I am designing a website for my friend and myself. The main feature of our site is a poll that asks users to choose between two options. Currently, I have set the input type as radio buttons where users can click on a circle to make their selection. Howeve ...

Utilizing React JS to Embed PDF Page Numbers in an Iframe: A Step-by-Step

How can I use reactjs to include pageno in an iframe? // If 'image' is available, show another iframe which allows setting the page number. <Iframe className="iframes" url={`${image}?page=2`} // Change '2' t ...

Removing selected row(s) from a table using Angular

I have a table that looks like this: <p-dataTable [value]="example"> <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column> <p-column field="a" header="column 1"></p-column> ...

Closing the modal by simply clicking outside of it's boundaries

Is there a way to close the modal by clicking outside of it using pure JS or AngularJS? I'm struggling to figure out how to implement this functionality. Any assistance would be greatly appreciated. View Fiddle .modalDialog { position: fixed; ...

Checking for correct HTML tags using JavaScript

Looking to validate some input in javascript and confirm if it is a valid HTML tag. Any straightforward methods with JQuery for this task? If not, any suggestions on how to achieve this using Regex? Thank you! ...

How to create a scrollable table using HTML and CSS

I created a Dashboard, but I'm having trouble making my mailPage scrollable. If you have some time to spare, could you please take a look at my website and help me with this issue? Here is my code: window.addEventListener("load", function () { ...

Unable to transmit JSON data through FETCH protocol

I have set up an API Service using node js on port 3001 and a web UI with REACT running on port 3000. My goal is to POST details in JSON format from the web page to the API. While I can successfully hit the API, the JSON data is not being received properly ...

Ways to avoid slider label overlap issues in Material UI?

https://i.stack.imgur.com/UBT3U.png I am using a slider in MUI to display the current percentage fetched from an API with an emoji, but when it reaches close to 75%, the labels overlap on mobile devices. Is there a way to move just the emoji label above t ...

Iterate through a list of checkboxes in PHP, wherein some may not be selected

My HTML schema is structured as follows: URL: https://i.sstatic.net/9RRpx.jpg Check Box Names: The Monday column has the name attribute set as arrayLunes[], and the Tuesday column with arrayMartes[] and so on... Initially, I need to test the list for Mo ...

Tips for animating slider elements that are not set to absolute positioning

I'm currently working on implementing an animated slider for my website. I have been using floats and margins to position the elements of the slider, but now I want to find a way to incorporate animations without having to use CSS3 transitions with ab ...

Using PHP and an HTML form to insert data into a MySQL database

I'm having an issue with inserting data into a MySQL database using PHP and an HTML form. After hitting submit, I receive a message stating that the item was inserted successfully. However, when I check phpMyAdmin, the table appears to be empty. The ...

Adjust the height of a div according to the width using CSS in a progressive manner

I'm looking to create a fluid container that adjusts its height gradually based on the width of the window (as the div's width is set to 100%). Similar to the behavior achieved with the aspect-ratio CSS rule, I want the height to smoothly increas ...

style of placing a space between objects

Is there a way to create space between the border (underline hover effect) and have the color of the line be red? a { text-decoration: none } li { display: inline; } li:hover { text-decoration: underline; } <li><a href=""> abc < ...

Retrieving parameters using Ajax and JSON from a login form

Here is my question: I am developing a login feature for a jQuery mobile application using a standard HTML login form. Upon clicking the submit button, I verify the correctness of the provided username and password through Ajax and JSON. However, when har ...