What is the best way to display the mobile view on a mobile device?

Encountering an issue with my WordPress theme - when accessing my website on mobile, it is displaying the desktop view. However, when I switch to mobile view using inspect element, it works correctly.

Visit https://www.pdfcar.com for more information.

Answer №1

It's possible that I may not have fully grasped your question, but you might want to consider inserting the following code in the <head> section of your HTML document:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">

Answer №2


<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
    box-sizing: border-box;
}

.clsdivmain {
    background-color: #660066; /* Purple */
}

.center {
    margin: auto;
    width: 60%;
    padding: 10px;
    text-align: center;
}

.table {
    border: 1px solid black;
    width: 70%;
    margin: auto;
}

.buttonPay {
    background-color: #660066; /* Purple */
    border: none;
    color: white;
    padding: 15px 32px;
}

.buttonCancel {
    background-color: #0071A5; /* Blue */
    border: none;
    color: white;
    padding: 15px 32px;
}

@media screen and (max-width:800px) {
    .table {
        width: 100%;
    }

    .center {
        width: 100%;
    }

    .buttonPay,
    .buttonCancel {
        width: 100%;
    }
}
</style>
</head>
<body>
    <table class="tableheader">
        <tr>
            <td align="right"><img src="logo.png" clas="responsiveImg1"></td>
        </tr>
    </table>
    <table class="tableheader">
        <tr>
            <td class="tablerowwidth" height="10"><label
                class="headingtext1">Heading 1</label></td>
        </tr>
    </table>
    <div class="infoText">
        <table class="table1">
            <tr>
                <td>Mr,<br>Message one<br>Message two</td>
            </tr>
        </table>
    </div>

    <div class="labels">
        <p class="table2">Subheading one</p>
        <table class="table">
            <tr>
                <td width="30%">Field one</td>
                <td width="45%" class="generaltext">AAAAAAAA</td>
                <td width="20%" class="tablerowwidth3"></td>
                <td width="5%" class="tablerowwidth3"></td></tr></table></div></body></html></code></pre></div></answer2></answer2>
<exanswer2><div class="answer" i="56408241" l="4.0" c="1559393882" a="dXNlcjExNTg0OTQw" ai="11584940">
<pre><code>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
    box-sizing: border-box;
}

.clsdivmain {
    background-color: #660066; /* Purple */
}

.center {
    margin: auto;
    width: 60%;
    padding: 10px;
    text-align: center;
}

.table {
    border: 1px solid black;
    width: 70%;
    margin: auto;
}

.buttonPay {
    background-color: #660066; /* Purple */
    border: none;
    color: white;
    padding: 15px 32px;
}

.buttonCancel {
    background-color: #0071A5; /* Blue */
    border: none;
    color: white;
    padding: 15px 32px;
}

@media screen and (max-width:800px) {
    .table {
        width: 100%;
    }

    .center {
        width: 100%;
    }

    .buttonPay,
    .buttonCancel {
        width: 100%;
    }
}

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

What is the reason behind the jQuery .after() method inserting a row that is cramming itself into one cell?

I'm attempting to dynamically add cells to the right side of a table using jQuery when a row is clicked. I have successfully implemented inserting a new row on click, which also toggles its visibility with CSS. However, I am encountering an issue whe ...

Center the content within the div

Is there a way to center the content of the second column within this div? I've tried various methods without success so far. I'm currently using Bootstrap 4. Can anyone provide guidance on how to achieve this? <div class="card"> < ...

Fixing the bug in the circle text animation

I followed the instructions in this tutorial and implemented the following code: Splitting(); * { margin: 0; padding: 0; box-sizing: border-box; font-family: monospace; } body { display: flex; justify-content: center; align-items: center; ...

Exclusive Checkbox Update

My code is causing me some trouble. When I click the update button, I want to only display the checked fields from the checkboxes on the redirected page. Below, I will share the code from the initial page, followed by the code from the second page where t ...

What steps can I take to resolve this CSS problem?

I'm trying to create a box around specific html elements, but the current code is causing each element to be enclosed individually. I don't want to use the html or body element as I have other elements that need to remain outside of the box. h1, ...

Prevent sibling divs from being affected by onClick events in React

Currently, I am facing an issue with changing the className of a specific div element when clicked. Whenever I click on one div, the classNames of all the div elements change. This problem arose from converting a vanilla JS concept into a React component. ...

Instructions for converting a MySQL select statement within a foreach() loop into an HTML form

I'm in the process of developing a course registration system for a small project. Currently, I have a table named 20182019carryovertbl from which I successfully select students who are carrying over their courses. Now, I need to transform this select ...

When the <dd> tag is present in a Definition List, divide it into multiple columns. If

Can anyone help me with a solution to split a list similar to the following into multiple columns without breaking it into separate definition lists? <dl> <dt>Title of Column 1</dt> <dd>data for col 1</dd> <dd& ...

Create a captivating sliding effect on Windows 8 using a combination of CSS and JavaScript

I believe that using css3 alone can achieve this effect, but I'm struggling with understanding properties like 'ease' in css3. This is the progress I have made so far: http://jsfiddle.net/kwgy9/1/ The word 'nike' should slide to ...

Having trouble getting the jQuery slider to function properly

Can someone help me figure out how to make a slider work with jQuery? Here is the HTML code I am currently using: <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://aj ...

What are the steps for positioning tables using HTML?

As a newcomer to this field (literally just started two days ago), I have managed to generate tables from an XML file using my XSL file. However, aligning these tables properly has become a bit of a challenge. I initially used the align attribute of <ta ...

Having trouble making a background image stay fixed to the window with Bootstrap 3

Having trouble getting a full background image in Bootstrap 3? The image is cropping below and not displaying properly on all devices. Can anyone help me out? I've been trying to fix this for quite some time. background-repeat: no-repeat; min- ...

Personalized Pinterest button to link to a custom URL (Text Link, Image, or Both)

I've been searching for a solution without success. I'm looking to customize the image for my Pinterest (Pin It) button and pin a specific image by URL, not just the current page. Here is the custom link I created: <a href="http://pinterest. ...

Encountering a Vuetify CSS issue upon building for production

We recently acquired a Vue web app from a third party and have been working on enhancing it. One of the modifications we made was to integrate Vuetify in order to utilize its elements. While everything functioned smoothly during development, we encountered ...

The functionality of PIE styling has ceased to work on IE9

A while ago, I created a web page specifically for IE9 with some PIE styling for a nice gradient effect. The gradient looked great initially, but as I added more features to the page, it suddenly disappeared. Even after reverting back to the original versi ...

With a simple click of a button, I aim to have the ability to set a variable to true

I am looking to create a button that changes to true in the Script section. This will allow for a random number to be displayed in the paragraph element. <!doctype html> <html> <button id="button"> random number </button> ...

The link button became unresponsive as soon as I implemented CSS changes

I customized one of my buttons with special styling, and now I'm facing an issue where the button is clickable but it fails to direct me to the intended link (which should open a YouTube video in a new tab). #help { background-color: cornflowerbl ...

Is there a way to have the information on the table automatically update based on the selection made in a drop-down menu?

When a user is selected from the combo box, I want the table displaying user data from the database to only show information related to the selected user. I attempted to use an array to store values but was unable to make it work. A Combo Box that allows ...

Using Paper Checkbox to Toggle the Visibility of a Div in Polymer

Having experience with Meteor, I typically used JQuery to toggle the display of a div along with paper-checkbox: HTML: <paper-checkbox name="remoteLocation" id="remote-chk" checked>Remote Location</paper-checkbox> <div id="autoUpdate" clas ...

Create two floating divs that adjust their height dynamically to be equal

Situation: I have a container with two direct children, known as "left" and "right". The height of the "left" child should never exceed the height of the "right" child. However, the "right" child can extend beyond the height of the "left" child. I am stru ...