Text inside image isn't responsive












0















I'm making a small webpage, my problem is that the text inside the image isn't responsive for all devices, so can anyone help me make that text responsive, here are my codes:



<html>
<head>
<title>resturant</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="main.css">
<script src="script.js"></script>
</head>

<body>
<div id="w3-display-container w3-mobile" id="main">
<img src="headerimg.jpg" class="w3-image w3-mobile">
<div class="w3-display-topleft w3-mobile" id="title"><br /><p>Welcome to <strong>JS</strong> resturant</p></div>
<p class="w3-display-left w3-mobile" id="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque at enim voluptatibus, veniam omnis quaerat cumque deleniti repellat tempore rem sapiente temporibus consectetur illum praesentium eius, expedita totam? Earum, quos?</p>
</div>
</body>

</html>


and here's my CSS styles




#title {
color: rgb(255, 237, 75);
font-size: 40px;
font-weight: bold;
padding-left: 30px;
}

#title strong {
color: brown;
}

#description {
max-width: 40%;
padding-left: 40px;
font-size: 20px;
font-weight: bold;
}









share|improve this question

























  • By responsive, are you talking about the font-size or the alignment of the text on the image?

    – AndrewL64
    Jan 19 at 9:25













  • Try to share a screenshot of your issue...

    – keul
    Jan 19 at 9:31
















0















I'm making a small webpage, my problem is that the text inside the image isn't responsive for all devices, so can anyone help me make that text responsive, here are my codes:



<html>
<head>
<title>resturant</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="main.css">
<script src="script.js"></script>
</head>

<body>
<div id="w3-display-container w3-mobile" id="main">
<img src="headerimg.jpg" class="w3-image w3-mobile">
<div class="w3-display-topleft w3-mobile" id="title"><br /><p>Welcome to <strong>JS</strong> resturant</p></div>
<p class="w3-display-left w3-mobile" id="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque at enim voluptatibus, veniam omnis quaerat cumque deleniti repellat tempore rem sapiente temporibus consectetur illum praesentium eius, expedita totam? Earum, quos?</p>
</div>
</body>

</html>


and here's my CSS styles




#title {
color: rgb(255, 237, 75);
font-size: 40px;
font-weight: bold;
padding-left: 30px;
}

#title strong {
color: brown;
}

#description {
max-width: 40%;
padding-left: 40px;
font-size: 20px;
font-weight: bold;
}









share|improve this question

























  • By responsive, are you talking about the font-size or the alignment of the text on the image?

    – AndrewL64
    Jan 19 at 9:25













  • Try to share a screenshot of your issue...

    – keul
    Jan 19 at 9:31














0












0








0








I'm making a small webpage, my problem is that the text inside the image isn't responsive for all devices, so can anyone help me make that text responsive, here are my codes:



<html>
<head>
<title>resturant</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="main.css">
<script src="script.js"></script>
</head>

<body>
<div id="w3-display-container w3-mobile" id="main">
<img src="headerimg.jpg" class="w3-image w3-mobile">
<div class="w3-display-topleft w3-mobile" id="title"><br /><p>Welcome to <strong>JS</strong> resturant</p></div>
<p class="w3-display-left w3-mobile" id="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque at enim voluptatibus, veniam omnis quaerat cumque deleniti repellat tempore rem sapiente temporibus consectetur illum praesentium eius, expedita totam? Earum, quos?</p>
</div>
</body>

</html>


and here's my CSS styles




#title {
color: rgb(255, 237, 75);
font-size: 40px;
font-weight: bold;
padding-left: 30px;
}

#title strong {
color: brown;
}

#description {
max-width: 40%;
padding-left: 40px;
font-size: 20px;
font-weight: bold;
}









share|improve this question
















I'm making a small webpage, my problem is that the text inside the image isn't responsive for all devices, so can anyone help me make that text responsive, here are my codes:



<html>
<head>
<title>resturant</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="main.css">
<script src="script.js"></script>
</head>

<body>
<div id="w3-display-container w3-mobile" id="main">
<img src="headerimg.jpg" class="w3-image w3-mobile">
<div class="w3-display-topleft w3-mobile" id="title"><br /><p>Welcome to <strong>JS</strong> resturant</p></div>
<p class="w3-display-left w3-mobile" id="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque at enim voluptatibus, veniam omnis quaerat cumque deleniti repellat tempore rem sapiente temporibus consectetur illum praesentium eius, expedita totam? Earum, quos?</p>
</div>
</body>

</html>


and here's my CSS styles




#title {
color: rgb(255, 237, 75);
font-size: 40px;
font-weight: bold;
padding-left: 30px;
}

#title strong {
color: brown;
}

#description {
max-width: 40%;
padding-left: 40px;
font-size: 20px;
font-weight: bold;
}






javascript html css






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 19 at 11:06









Hp_issei

41228




41228










asked Jan 19 at 9:21







user10932453




















  • By responsive, are you talking about the font-size or the alignment of the text on the image?

    – AndrewL64
    Jan 19 at 9:25













  • Try to share a screenshot of your issue...

    – keul
    Jan 19 at 9:31



















  • By responsive, are you talking about the font-size or the alignment of the text on the image?

    – AndrewL64
    Jan 19 at 9:25













  • Try to share a screenshot of your issue...

    – keul
    Jan 19 at 9:31

















By responsive, are you talking about the font-size or the alignment of the text on the image?

– AndrewL64
Jan 19 at 9:25







By responsive, are you talking about the font-size or the alignment of the text on the image?

– AndrewL64
Jan 19 at 9:25















Try to share a screenshot of your issue...

– keul
Jan 19 at 9:31





Try to share a screenshot of your issue...

– keul
Jan 19 at 9:31












3 Answers
3






active

oldest

votes


















0














You should include the following viewport element in all your web pages:



A viewport element gives the browser instructions on how to control the page's dimensions and scaling.



The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).



The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.






share|improve this answer































    0














    Share a screenshot of the issue



    Anyway, you can use
    font-size: CSS;



    CSS can be:
    100%, 100vw, x% or xvw (x is a number) to make it responsive



    Also don't forget about
    <meta name="viewport" content="width=device-width, initial-scale=1" /> in HTML






    share|improve this answer


























    • I tried this but it doesn't work

      – user10932453
      Jan 19 at 13:56



















    -1














    Add this below line inside head,



    <meta name="viewport" content="width=device-width, initial-scale=1.0">





    share|improve this answer


























    • When you add code, but ESPECIALLY XML or HTML, you need to format it as code. See this for more info if you don't know how

      – Zoe
      Jan 19 at 10:49













    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54265652%2ftext-inside-image-isnt-responsive%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown
























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You should include the following viewport element in all your web pages:



    A viewport element gives the browser instructions on how to control the page's dimensions and scaling.



    The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).



    The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.






    share|improve this answer




























      0














      You should include the following viewport element in all your web pages:



      A viewport element gives the browser instructions on how to control the page's dimensions and scaling.



      The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).



      The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.






      share|improve this answer


























        0












        0








        0







        You should include the following viewport element in all your web pages:



        A viewport element gives the browser instructions on how to control the page's dimensions and scaling.



        The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).



        The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.






        share|improve this answer













        You should include the following viewport element in all your web pages:



        A viewport element gives the browser instructions on how to control the page's dimensions and scaling.



        The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).



        The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 19 at 12:03









        Sonal NagwekarSonal Nagwekar

        161




        161

























            0














            Share a screenshot of the issue



            Anyway, you can use
            font-size: CSS;



            CSS can be:
            100%, 100vw, x% or xvw (x is a number) to make it responsive



            Also don't forget about
            <meta name="viewport" content="width=device-width, initial-scale=1" /> in HTML






            share|improve this answer


























            • I tried this but it doesn't work

              – user10932453
              Jan 19 at 13:56
















            0














            Share a screenshot of the issue



            Anyway, you can use
            font-size: CSS;



            CSS can be:
            100%, 100vw, x% or xvw (x is a number) to make it responsive



            Also don't forget about
            <meta name="viewport" content="width=device-width, initial-scale=1" /> in HTML






            share|improve this answer


























            • I tried this but it doesn't work

              – user10932453
              Jan 19 at 13:56














            0












            0








            0







            Share a screenshot of the issue



            Anyway, you can use
            font-size: CSS;



            CSS can be:
            100%, 100vw, x% or xvw (x is a number) to make it responsive



            Also don't forget about
            <meta name="viewport" content="width=device-width, initial-scale=1" /> in HTML






            share|improve this answer















            Share a screenshot of the issue



            Anyway, you can use
            font-size: CSS;



            CSS can be:
            100%, 100vw, x% or xvw (x is a number) to make it responsive



            Also don't forget about
            <meta name="viewport" content="width=device-width, initial-scale=1" /> in HTML







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 19 at 10:35

























            answered Jan 19 at 10:15









            S.s.S.s.

            34




            34













            • I tried this but it doesn't work

              – user10932453
              Jan 19 at 13:56



















            • I tried this but it doesn't work

              – user10932453
              Jan 19 at 13:56

















            I tried this but it doesn't work

            – user10932453
            Jan 19 at 13:56





            I tried this but it doesn't work

            – user10932453
            Jan 19 at 13:56











            -1














            Add this below line inside head,



            <meta name="viewport" content="width=device-width, initial-scale=1.0">





            share|improve this answer


























            • When you add code, but ESPECIALLY XML or HTML, you need to format it as code. See this for more info if you don't know how

              – Zoe
              Jan 19 at 10:49


















            -1














            Add this below line inside head,



            <meta name="viewport" content="width=device-width, initial-scale=1.0">





            share|improve this answer


























            • When you add code, but ESPECIALLY XML or HTML, you need to format it as code. See this for more info if you don't know how

              – Zoe
              Jan 19 at 10:49
















            -1












            -1








            -1







            Add this below line inside head,



            <meta name="viewport" content="width=device-width, initial-scale=1.0">





            share|improve this answer















            Add this below line inside head,



            <meta name="viewport" content="width=device-width, initial-scale=1.0">






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 19 at 10:48









            Zoe

            11.6k74379




            11.6k74379










            answered Jan 19 at 10:33









            PrakashPrakash

            111




            111













            • When you add code, but ESPECIALLY XML or HTML, you need to format it as code. See this for more info if you don't know how

              – Zoe
              Jan 19 at 10:49





















            • When you add code, but ESPECIALLY XML or HTML, you need to format it as code. See this for more info if you don't know how

              – Zoe
              Jan 19 at 10:49



















            When you add code, but ESPECIALLY XML or HTML, you need to format it as code. See this for more info if you don't know how

            – Zoe
            Jan 19 at 10:49







            When you add code, but ESPECIALLY XML or HTML, you need to format it as code. See this for more info if you don't know how

            – Zoe
            Jan 19 at 10:49




















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54265652%2ftext-inside-image-isnt-responsive%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Liquibase includeAll doesn't find base path

            How to use setInterval in EJS file?

            Petrus Granier-Deferre