I'm having trouble getting the width set to 100% to work on my website. Can you assist me in making my website

I'm in the process of creating my first portfolio website for myself. It looks fantastic when viewed on a desktop computer, but once I try to open it on a mobile device, it's not responsive at all. I have experimented with setting the width to 100%, however, on mobile devices, the content gets too small and hard to read. Any advice or assistance on how to solve this issue would be greatly appreciated. You can view the website here () and access the code here ().

Answer №1

Acknowledged, the container's fixed size limits its responsiveness. I recommend utilizing CSS grid for both the container and various sections on mobile displays in conjunction with media queries

For example:

@media screen and (max-width: 768px) {
  .header-text-box {
    grid-column: 1;
    grid-row: 1;
}

img {
    grid-column: 1;
    grid-row: 2;
}
}

Answer №2

It's recommended to adjust the container size to fit the entire body (100%) rather than setting it to a fixed 960px width.

.container {
  width: 960px;
  margin: 0 auto;
}

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

The functionality of Ng-Show is acting up

$scope.stay = function() { alert("Inside Keep me In") $scope.timed = false; $scope.isLogStatus = true; } $scope.displayAlert = function() { $scope.timed = true; alert("inside display") } function idleTimer() { var t; $window.o ...

The Vue/Vuetify wrapper component does not automatically pass on the `hide-details` parameter to the input component

I recently crafted a custom wrapper for the v-select input using Vuetify. Along with custom properties, I utilized the v-bind="$props"attribute to inherit all props. Upon testing, I observed that while this method applies to most props, it doesn ...

Customize MUI Tabs to resemble the design of Bootstrap Nav Tabs

Looking to customize Material UI Tabs to resemble Bootstrap Tabs. Made significant changes, but struggling with removing the border-bottom on the activeTab. In Bootstrap, they use marginBottom: -1px on the active tab, but it doesn't work for me. Any s ...

Enhance your website with Bootstrap 5's responsive rounded corners feature

Utilizing Bootstrap 5.3.1, I have successfully implemented responsive borders using the Utility API. My CSS file includes classes such as .rounded-top-sm-4 and .rounded-end-sm-4. # utilities_custom.scss @import "bootstrap/functions"; @import &quo ...

I am looking to showcase a text directly from the properties file using the thymeleaf template engine

I have two files named message_ar.properties and messages_fr.properties for internationalization purposes. Within my HTML file, I am attempting to show the correct label for a confirm message. To accomplish this, I am utilizing Thymeleaf as my template e ...

Centered vertically on the right side of a div, a CSS arrow is positioned

Hello, I am seeking a way to vertically center a CSS triangle/arrow on the right side of a div using pure CSS. Unfortunately, I can't include images due to my low reputation. Currently, my code is not functioning properly and lacks cross-browser comp ...

What is the best way to position my two icons next to each other in the footer of my React application?

I'm struggling with styling the footer of my react portfolio project. I specifically want to include Github and LinkedIn icons side-by-side at the bottom of the screen, but currently, they are stacked vertically in the middle of the page with too much ...

Adding a simulated bottom border to a rotated container

Currently, I am utilizing the CSS3 rotate value to create an arrowhead effect for modal boxes. However, I now require a full arrowhead design with a bottom border. As this involves rotating a div at a 45° angle, adding another border to either side will n ...

Disabling padding on TwitterTweetEmbed component in React Twitter Embed

Having an issue with Material UI and React Twitter Embed, unable to remove top and bottom margins. Here's the code snippet causing concern: const styles = theme => ({ listItem: { padding: '0px', }, tweetSize: { margin: 0, ...

HTML5 Slideshow with Smooth Image Transitions

So, I have created an HTML5 image slideshow and it's working perfectly on my localhost. However, I am puzzled as to why there is no transition effect within the slideshow. I was expecting something like fading out the first picture and then having the ...

What is the best way to halt the ticking of this clock in JavaScript?

I can't seem to figure out how to stop this clock using JavaScript Even though I press the stop button, the clock keeps running <!DOCTYPE html> <html> <head> <h1> Welcome to the clock. Press the stop button to halt the clo ...

Create a dynamic image positioned alongside text specifically designed for mobile devices

One of my challenges involves implementing a responsive image in Bootstrap (3.3.7): <div class="col-sm-2 text-center"> <img class="img-responsive center-block " src="img/1.png" style="max-width: <p>I would like to include some gua ...

Displaying a concealed form or Unveiling a popup dialog

What is the most effective way to display a simple form on an HTML page with a save button that calls a web method? I'm currently contemplating between the following options: Reveal a hidden <div> containing a form with the same functionality ...

Css styling for text highlighting

It's been some time since I encountered a CSS problem, but here I am facing one. In short, I want to highlight text with a gradient background, which I managed to achieve using the <span> tag and setting a background image on it. However, I ran ...

Error 404: The requested file could not be located on the MAMP server

Whenever I try to access a PHP file on MAMP, I keep getting a 404 error message. The error reads: "The requested URL /‘welcome.php’ was not found on this server." Oddly enough, both the HTML and PHP files work perfectly fine when accessed via localho ...

Using jQuery's replaceWith() function to swap out content with a footer generated by an

I have a function that takes a variable and replaces a specific with that variable. JQUERY function updateCart(new_total) { var total = new_total; var content = $("#replaceme"); content.replaceWith("<h1>hello</h1> ...

The E.js Template encountered an error with an unexpected token "else"

I am in the process of creating a website quickly using e.js & Express. However, I am encountering some problems when trying to use an if-else statement within e.js tags. The if statement works fine, but as soon as I add an else statement, things start t ...

The high chart data is failing to load

I am brand new to highchart and have just started learning how to create a simple pie chart in HTML. Unfortunately, I am having trouble getting it to work properly. Everything seems correct to me, but for some reason, the highchart is not populating. Here ...

Convert PHP function output to HTML element

Check out the content of my Class.php file: <?php class Class { public function validate() { if(empty($_POST['first_name'])) { return 'first name should not be empty!'; } elseif(em ...

Add a new to-do list item to the current list using jQuery

Currently, I am in the process of developing a todo list application using jQuery. However, I have encountered some issues and bugs that are causing challenges. Initially, my objective was to set the first element through HTML code, which is functioning as ...