Designing a website layout for android devices

Could this inquiry receive positive feedback rather than being downvoted? I have conducted thorough research before posting.

I've been experimenting with developing a responsive website for practice. It worked well on my computer; every time I adjusted the size, it would resize proportionally. However, when I tried accessing it on my Samsung Galaxy S3 phone, nothing changed.

The technique involved setting a root font-size and making the code's font-sizes dependent on it. By establishing a container for the entire blog (with height set to 100%) and using percentages (%) for the child elements' heights and widths, along with implementing a media query for the phone screen dimensions.

Here is the output: image

What could potentially be causing this issue? Your constructive criticism and coding tips are welcome.

* {
            box-sizing: border-box;
            padding: 0;
            margin: 0;
         }

         html, body {
            font-size: 16px;
            height: 100%;
         }

         .blog {
            height: 100%;
         }
         
         /* Additional CSS Code Goes Here */

         @media only screen and (max-width: 480px) {
            html, body {
               font-size: 12px;
               height: 100%;
            }
<!-- HTML Snippet Goes Here -->

Answer №1

Indeed, as mentioned in the initial response, the inclusion of the

<meta name="viewport" content="width=device-width, initial-scale=1">
head tag was essential to ensure mobile responsiveness on the website. Additionally, there are plans to update the code with additional features such as links within the banner and integrating a button into the first image.

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html, body {
  font-size: 16px;
  height: 100%;
}

... (CSS code continues)

<!DOCTYPE html>
<html>
<head>
<title>MyWeb</title>
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css">
  <link href="https://fonts.googleapis.com/css?family=Rock+Salt" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Covered+By+Your+Grace" rel="stylesheet">
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>

... (HTML code continues)

</body>
</html>

Exciting developments await as we progress to refine the paragraphs and enhance the overall content! 😊

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

Is there a way to develop an AI system for an android application that can process a user's price proposal and then respond by either accepting, rejecting, or suggesting a counter-offer?

Apologies in advance if my question is a bit vague, but I need assistance with an Android app and AI project. Our college group has been tasked with creating an app where users can bargain against an AI for a price offer. The basic concept is to allow use ...

How DataTables Handles Loading and Rendering Time Delay

Utilizing DataTables in conjunction with Bootstrap 4 for client-side processing while displaying approximately 2,000 records. The loading time is acceptable, but upon refreshing the page (F5), I observe an unformatted DataTable briefly appearing. It seems ...

Text beyond the body tag

My current setup includes: html, body { height: 100%; } section { width: 100%; height: 100%; } However, I have noticed that any content appearing below the .full class is not being included within the body tag. Is there a way to address ...

What is the best way to extend a floated element to completely occupy the vertical space within the viewport?

Creating a help system using Bootstrap. The goal is to have the left navigation fill the vertical space, regardless of the size of the menu or content. In addition, the footer should remain at the bottom of the page when there is minimal content but shoul ...

I'm encountering difficulties with customizing the root styling of material-ui's DialogActions

Check out the two buttons in a DialogActions just like this. This is the JSX snippet I'm working with: <DialogActions classes={{ root: classes.dialogActionsLeft }}> <Button autoFocus onClick={() => { setOpen(false); }} ...

Tips for establishing a real-time connection with a PHP file on a web server using PhoneGap (Android app)

When testing the provided code on a wamp server in localhost, everything runs smoothly. The code calls a php file to connect to a MySql DB and fetch data. Nevertheless, my current goal is to create a mobile app using PhoneGap. The given code resides in an ...

How can I convert dates into a different format?

I have various event dates that are stored in the format 20131212 or 20100125, or any date submitted by a user for an event (formatted as yyyymmdd). I have created a function that displays all events for a specific month. However, the date is currently di ...

The native library could not be located by System.loadLibrary(...) in my situation

Attempting to utilize an existing native library from a different Android project, the NDK built library (libcalculate.so) was copied to the new Android project. Within the new project, a folder named libs/armeabi/ was created to house libcalculate.so with ...

What is the best way to properly encapsulate a variable within single and double quotation marks in PHP?

Can someone help me with this HTML input issue? I'm struggling to include the $coins variable inside single and double quotes. echo '<form action="action.php" method="post"> <input type="number" max=& ...

Are CSS class names the secret sauce of web design?

Imagine we have a 'Car' bean containing information about the color of a car, and we want to display the color name in that specific color along with an image of the car next to it. Currently, the bean handles the conversion of the color name to ...

"Fixing the issue of an undefined option being added to

In my controller, I have defined an object called tempScale: $scope.tempScale = { scaleType : [], deviations : [], intervals : 0 }; This object is connected to the HTML through this code: <select id="scales" ng-model="tempScale.scaleType" ...

Greek symbols do not display correctly in SQL Server when accessed through PHP

At my server database, there is a table with collation set to greek_ci_ai, but I am facing an issue where Greek characters are displaying as question marks(????). I have attempted using header("Content-Type: text/html; charset=iso-8859-7") and <meta ...

I'm having trouble modifying the border color of a TableCell component in material-ui

I am struggling to change the border color of a table cell. Despite numerous attempts, I have been unsuccessful in my efforts. Can someone please assist me with this? const customTheme = createTheme({ overrides: { MuiTableCell: { root: { ...

Tips for choosing a drop-down menu option without an identifier using Selenium in Python

I am trying to choose an element/item from a drop-down menu in Python and Selenium without using an id element. Here is the HTML code snippet: <mbo-transaction-mode-select mode="filters.mode" class="ng-isolate-scope"> <select class="form-con ...

Fragment Class Encountering Inflation Exception

I'm currently working on a project that involves using fragments. Every time I run a test on the project, I encounter an exception in my fragment class pointing to the inflater line of my onCreateView method, as shown below. Process: com.example.joey ...

Gradle sync unsuccessful: Failed to establish connection with server

I have been encountering a persistent error in Android Studio 3.0, which states: Cannot initiate internal HTTP server. Git integration, JavaScript debugger and LiveEdit may function with errors. Please review your firewall settings and restart Android Stu ...

The process of manipulating the content of an HTML textarea using Selenium with Python

http://neomx.iwedding.co.kr/roundcube I attempted to change the content of a textarea, specifically the tracking number. My goal was to replace "9400111206213835724810" with "487289527385922090". However, I encountered an error message stating "ElementNot ...

The issue persists with Font-Awesome loading in Edge and IE browsers

I've been experimenting with using netdna.bootstrapcdn.com. So far, it's working perfectly in Firefox and Chrome but I'm encountering loading issues in IE - 11 and Edge. This is how I imported the CSS library: <link rel="stylesheet& ...

Expanding a list of object arrays through iteration: A step-by-step guide

// Initializing with one object let posi_val=[{top: '3px', left: '2px'}]; // Adding another object in the loop for (let i = 1; i < n; i++) { posi_val.push({ top: `${posi_val[i - 1].top.slice(0, -2) * 2}px`, l ...

Extracting a text value from a div using jQuery instead of displaying it in an alert modal

Can someone help me figure out a simple way to display text in a div that indicates what has changed compared to an alert modal with the following code? I'm struggling to understand it. Thanks... $(function(){ var abc = $('selec ...