Responsive design for iPads and smartphones is essential in ensuring a seamless user

Currently in the process of creating my own personal website, I have been diligently using Chrome Canary to ensure that all my media queries are properly set up. While everything looks great on Canary and functions well in various device modes within the browser, the issue arises when trying to view the page on an iPad, iPhone, or Blackberry, as it does not display correctly. On mobile phones, anything below the "Featured Work" section fails to appear at all. On iPads, the content after the "Featured Work" section appears condensed into a single column spanning 33.33% of the page width. This inconsistency has left me puzzled.

To sum up my query: What key element am I overlooking in my HTML or CSS files that would rectify the layout problems on iPads and iPhones?

In the head section of my HTML file, I have included:

Initially, the sole media query present was:

@media only screen and (max-width: 767px)

Upon realizing this didn't suffice for iPads and iPhones, I subsequently added:

@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {

@media only screen and (min-device-width : 320px) and (max-device-width : 568px) {

While testing in Chrome, everything seemed fine until images became too small (around 800px), resulting in font size discrepancies as the page scaled down. I opted to restructure the lower portion of the page (beneath "Featured Work") utilizing the "@media only screen and (max-width: 767px)" query.

The peculiar display issues persist on my iPad, despite several attempts to address them with variations in display properties such as flex, inline, or box. None of these adjustments proved successful.

In attempting to tackle the iPhone problem, I experimented with duplicating the content under the "@media only screen and (max-width: 767px)" and placing it beneath the "@media only screen and (min-device-width : 320px) and (max-device-width : 568px)" query. Regrettably, this did not yield the desired outcome.

I have yet to explore the option of entirely rewriting my CSS file. My initial inclination is to consider adjusting the div widths to specific pixel values rather than percentages, based on the fixed widths of these devices. Yet, this approach seems somewhat excessive.

Answer №1

Give this a shot: Adjusted to fit within the margins...

.projectdetails {
    width: 100%;
    height: 30%;
    display: inline-block;
    max-height: 300px;
}
.project {
    width: calc(33.33% - 6px);
    height: 100%;
    margin: 0px 3px 0px 3px;
    float:left;
}

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 adjusting the font size on the Google Maps mapType controller

Is it possible to adjust the font size of a Google Maps mapType controller using HTML or CSS? I've managed to change the size of the controller, but struggling with the font size. HTML: <div #map id="map" style="height:250px;"></div> C ...

How to dynamically adjust the size of an HTML page using jQuery without displaying

Currently, I am working on resizing an HTML page vertically using jQuery. While I have successfully managed to resize the page, I encounter a problem where depending on the image used, I sometimes see vertical or horizontal bars even though the image fits ...

Is there a way to make FullPage and Lightbox compatible with each other?

Currently utilizing Fullpage.js for my website, I am looking to incorporate a lightbox in one of the sections. However, upon attempting to load the script and CSS, my fullpage layout breaks and the sections collapse. I have experimented with placing the ...

I am having trouble displaying my mysqli table correctly. I could use some help troubleshooting my code as I am unable to locate the error

After implementing Bootstrap, I am facing an issue with the table display on my new page. The code works perfectly fine on the old page, but for some reason, it's not showing correctly on the new one. Upon inspection, I suspect that mysqli_close and a ...

Elements of the user interface used for inputting an activation code

Seeking input on a usability issue I'm facing on my site. The homepage of my site has two sets of controls - one for user login and the other for new users to activate their accounts. The problem lies in the activation process. Users receive an acti ...

What is causing the radio button's background color not to change after it is selected?

I've been searching and exploring various solutions, but I'm encountering some difficulties with the following scenario: There are a few restrictions: Cannot utilize Javascript or Jquery. Must be achieved using pure CSS. My objective is to chan ...

Is there a way to change this from webkit to moz?

Is there a way to change this code from webkit to moz? background-color: #fff; background-image: -moz-linear-gradient(0deg, transparent 79px, #ABCED4 79px, #ABCED4 81px, transparent 81px), -moz-linear-gradient(#EEE .05em, transparent .05em); ...

What's the best method for efficiently hiding/showing a large number of DOM elements?

Imagine you have a maximum of 100 elements that remain consistent in type and format, but their content changes. These elements are connected to an input field and will update as the user types. What would be the most efficient approach for maximizing per ...

Tips for adjusting the height and border of Bootstrap tabs

I'm facing an issue with the modal and nav-tabs I created. There are a couple of problems that need to be addressed. Firstly, the tabs have excessive height and I've tried adjusting it using CSS height property, but it's not working as e ...

Tips for limiting the size of image uploads to under 2 megabytes

I am trying to implement an html select feature that allows users to upload images. <div class="row smallMargin"> <div class="col-sm-6"> Attach Image </div> <div class="col-sm-6"> <input type="file" ng-model="image" accept=" ...

Designing a dynamic class object for a material table

I am in need of assistance with creating an HTML table using data retrieved from an API. The structure of the data is as follows: { strTableName: "TestTable", strComment:"Approved", lstTableHeaders:[ {strFieldName : "Sl No.", strType:" ...

What is the best way to ensure the width of the div is adjusted to fit the table it contains?

What is the best way to adjust the width of a div containing a potentially wider-than-screen table? Despite setting padding: 10px for the div, the right padding disappears when the table exceeds the screen width. Below is an example code snippet: <div ...

What is the best way to incorporate buttons that trigger PHP scripts within a MySQL database?

I have a MySQL database filled with various records that I've displayed in an HTML table on a webpage. I want to add two buttons next to each record, both of which trigger PHP scripts. For example, let's say the table lists the names of three pe ...

html div elements may not align correctly

Currently, I am in the process of coding a website that contains numerous images. To assist me in organizing and arranging these images, I have turned to angularjs. Initially, everything was progressing smoothly until this issue arose: The layout is stru ...

Edit the contents within HTML strings without altering the HTML structure

If I have a string of HTML, it might look something like this... <h2>Header</h2><p>all the <span class="bright">content</span> here</p> I am interested in manipulating the string by reversing all the words. For example ...

Ways to Halt Every Single CSS Animation

Is there a way to stop all CSS animations in a document from the beginning? My idea is to assign a class to elements containing CSS animations at the start, such as '.paused'. Then, using jQuery in my JavaScript, I would remove the '.paused& ...

What is the best way to collapse the entire navigation menu after clicking a link (nav-link) within it?

I created a navigation menu using HTML and SCSS, but I'm facing an issue where the menu does not close when clicking on links inside it. The menu continues to overlay the content on the page instead of closing. Essentially, I want the navigation menu ...

Guide to assigning IDs to multiple paragraphs within a parent element using a for loop

Is there a way to use a for loop to set ID for each <p> inside a <div> element? HTML <div id="article"> <p>1</p> <p>2</p> <p>3</p> <p>4</p> <p>5</p> ...

Can you explain the concept of "entity-body" in relation to Digest Authentication?

Incorporating digest authentication and noticing mention of "entity-body" in the document for auth-int authentication. Is this referring to the HTML header and body, or just the HTML header section? For more information on digest authentication, check out ...

Can cookies operate on a local server?

Similar Question: Cookies on localhost with explicit domain Here is the code snippet that I am using after the user has logged in: setcookie("user",$entered_username, time()+(60*60*5)); setcookie("password",$entered_password, time()+(60*60*5)); ...