What are some ways to create a responsive design using Bootstrap?

I am currently enrolled in an online course on Bootstrap through Udemy. The issue I'm facing is that the course was created back in 2018, and as I follow along, many elements are not responsive. Text sizes are not displaying as assigned, and fonts are not rendering properly, which can be quite frustrating. If anyone understands what might be causing this, please offer your assistance! The stylings aren't being applied correctly to certain elements.

#title{
  background-color:#FF4C68;
  color: #fff;
}
body{
  font-family: "Montserrat";
}
h1{
  font-size:12rem;
  line-height:1.5;
  font-family:"Montserrat-Black";

}
h2{
  font-size:3rem;
  line-height:1.5;
  font-weight:bold;
  font-family:"Montserrat-bold";

}
h3{
  word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    -o-hyphens: auto;
    hyphens: auto;
}
p{
  color:#8f8f8f;
}

.container-fluid{
  padding:3% 15%;
}
.rotate{
  transform: rotate(30deg);
}
/* navigationbar */
.navbar{
  padding-bottom:8.5rem;
}
.navbar-brand{
  font-size:2.5rem;
  font-weight:bold;
  font-family:"Ubuntu"

}
.nav-item{
  padding: 0 18px;
}
.nav-link{
  font-size:1.12rem;
  font-family: "Montserrat-light"
}
/* Download buttons */
.Download-button{
  margin:5% 3% 5% 0;
}
/* image title */
.title-image{
  width:40%;
}
/* features-section */
#features{
  padding:7% 15%;
}
.feature-box{
  text-align:center;
  padding:5%;
}
.icon{
  color: #EF8172;
  
margin-bottom:2rem;  

}
.icon:hover{           
  color: #FF4C68;
}

/* testimonial section */
#testimonials{
  padding: 7% 15%;
  text-align: center;
  background-color:#EF8172;
  color:#fff;
}
.testimonial-image{
  width:55%;       

}
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>TinDog</title>
  <link rel="stylesheet" href="css/styles.css">
  <!-- google font -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital@1&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital@1&family=Ubuntu:wght@500&display=swap" rel="stylesheet">

Answer №1

Your current design seems to be responsive, mainly due to the limited col classes you've applied.

However, your issue doesn't lie in responsiveness (how it adapts to different screen sizes) but rather in styling. It's likely related to the order of your stylesheets.

It's important that your Bootstrap styles come first, followed by your custom CSS. By placing your custom styles on top of Bootstrap's, you will often encounter specificity conflicts with Bootstrap.

Currently, your custom styles are loaded first and then overridden by the Bootstrap stylesheet. Ideally, you'd want this sequence reversed.

I recommend structuring it like this:


<head>
  <meta charset="utf-8">
  <title>TinDog</title>
  <!-- bootstrap -->
  <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ee8c81819a9d9a9c8f9eaedbc0dfc0de">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
  <!-- google font -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital@1&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital@1&family=Ubuntu:wght@500&display=swap" rel="stylesheet">
  <!-- <link href="https://fonts.googleapis.com/css?family=Montserrat+Ubuntu" rel="stylesheet" > -->
  <link rel="stylesheet" href="css/styles.css">
  
  <!-- awsomefont -->
  <script src="https://kit.fontawesome.com/89569a1c7f.js" crossorigin="anonymous"></script>
</head>

Answer №2

Try placing your CSS link after Bootstrap in the header and check if that solves the issue.

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

Does the Spanned Textview HTML formatting only work on the last item in the loop?

My current challenge involves looping through all elements and setting them to a TextView, while also formatting numbers to be subscript. Despite my attempts at using a loop, only the last number is correctly formatted. For instance, if I input Fe2Zn7Ag4, ...

What is the reason behind the function boot yielding values that are of different types from the statistic utilized within boot?

Currently, I am utilizing the Bagging Tree method (Bootstrap Aggregation) for classification purposes and assessing its misclassification error rate in comparison to a single tree. I find it perplexing because while the function estim.pred generates a fac ...

Embracing the use of paragraph tags within tweets on a webpage

For a project on freecodecamp.com, I created a quote machine where you click a button to get a random quote and then have the option to tweet it using the "Tweet It" button. However, I encountered difficulty in getting the quote to display properly in the ...

PHP: implementing several forms on a single webpage

In my current situation, I need to display forms that resemble an Excel sheet with a submit button next to each row. When the submit button is clicked, the data is saved for that specific row, the row is disabled, and the focus automatically moves to the n ...

Recaptcha is functioning properly on smartphones, however, it is experiencing difficulty on computers

Hey there! I encountered an issue with my website where the recaptcha isn't working on the desktop version. It's strange because I've used the same code successfully on other sites before. I attempted to fix it by creating a new recaptcha a ...

react-full-page is causing my webpage to not open in a specific ID location, such as http://localhost:3000/#someIdWhereIWantThePageToBeOpened

I'm currently utilizing the react-full-page package and while it's almost working well, I've come across two issues: After clicking on an anchor link like <a href='#someId'>Go There</a>, the scroll goes to the designat ...

Text in d3.js vanishing while undergoing rotation

I have been struggling for hours with what seems like a simple problem and haven't made any progress. I'm hoping to receive some valuable advice from the brilliant minds on stackoverflow. You can view my demo at I attempted to use jsfiddle to s ...

"Trouble arises as bootstrap-select fails to function properly within a Bootstrap dropdown menu

I'm attempting to incorporate a multiselect input from the bootstrap-select Library into a Bootstrap dropdown menu. The issue arises when I open the dropdown menu and click on the multiselect input, causing the menu to close and preventing me from usi ...

I'm having trouble centering the links in my navigation bar using flexbox, and I'm not sure how to fix it

Struggling with creating a navigation bar for my portfolio-building project. The "Who needs a quote" element is correctly displaying on the left, but I can't figure out how to center align the links "Sports, business, politics". Tried using flexbox op ...

Centered on the screen are the input field and corresponding label

I am in the process of creating a signup form, and I have encountered an issue. How can I make the input wider without using a fixed width like width: 420px? Additionally, I would like to center both the input field and the label. I envision something simi ...

Working with both Javascript and jQuery code within a single HTML file

I recently created a website and on one of the pages, I added some jQuery elements like a start button and progress bar. However, when I tried to implement a JavaScript timer on the same page by adding the script into the header, the jQuery elements stoppe ...

The video continues playing even after closing the modal box

I am facing an issue with my code where a video continues to play in the background even after I close the modal. Here is the code snippet: <div class="modal fade" id="videoModal" tabindex="-1" role="dialog" aria- ...

The information is not appearing in the dropdown menu

The select tag for chapters is not displaying the result from the query properly. Instead of showing in the select tag, the chapter names are being displayed as echo statements. <!doctype html> <html> <head> <meta charset="utf-8"> ...

Positioning an absolute element inside a relative parent with a defined maximum width

I am attempting to position #header-supporter at the bottom right of #header-image, with overlapping elements. The challenge lies in setting a max-width of 1280px on #header-supporter-cont to maintain consistency with the site's margins. I have tried ...

Is it possible to create distinct overlapping divs without using absolute positioning?

I'm seeking assistance in developing the view shown below. I am familiar with using position absolute, but I'm wondering if there is a way to achieve this without relying on absolute values. https://i.sstatic.net/m13cl.png ...

I can't seem to figure out why the removeChild() function is not functioning properly in my

Recently, I've been working on a search website where users can input either a partial or full name and then click a button to display a list of actors whose names contain that specific string in a hint-like fashion. These names are sourced from a MyS ...

What is the best way to locate the textbox ID that is closest to a checkbox using jQuery

I've generated a dynamic datatable using jQuery with checkboxes in the first column and textboxes in the last column. I want to clear the value of the textbox when a user unchecks the corresponding checkbox. I tried using the closest function, but it& ...

Is it possible for jQuery to operate on an HTML structure that is stored in memory

Exploring In-Memory HTML Structures with jQuery. Take a look at this snippet of HTML code: <div id="template" hidden="hidden"> <div class="col-md-3 margin-bottom20"> <p id="template-title" class="text-capitaliz ...

Resizable vector graphics with consistent border dimensions

I need a solution that maintains a constant line width while still making the SVG responsive. Here is the desired outcome: https://codepen.io/dudleystorey/pen/wMLBLK The example linked above achieves this using CSS, but I am looking to achieve the same r ...