1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Text not responsive

Discussion in 'HTML & Website Design' started by HIPVIE, Oct 20, 2016.

  1. #1
    Hi experts,

    Please help, when I open my site on mobile, the text range not responsive. kindly have a look of the text sample below:
    [​IMG]
    How to make the text of 'rumahhosting.com' responsive.
     
    HIPVIE, Oct 20, 2016 IP
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #2
    Hi.
    One way is to wrap it in a block, center text-align it and resize font-size with vw units. Use the last rule only on narrow screen width. On wide desktop / landscape view, remove that last rule.

    Hendra
     
    hdewantara, Oct 20, 2016 IP
  3. HIPVIE

    HIPVIE Greenhorn

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    Thanks for the reply but I don't know how to apply what you mean. If you don't mind, would you please give me the steps?
    Thanks.
     
    HIPVIE, Oct 20, 2016 IP
  4. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #4
    Untested, but it'd be something like:
    HTML:
    
        <h1>
           Super murah promo domain dan hosting di
           <span>RumahHosting.com</span>
         </h1>
    
    HTML:
    CSS:
    
            h1{
               font-size: 3em;
             }
             h1 span{
               display: block;
               font-size: 10vw;
               color: red;
               text-align: center;
             }
           @media screen and (min-width:30em){
             h1 span{
               display: inline;
               font-size: inherit;
               color: blue;
               text-align: left;
             }
    
    Code (CSS):
     
    hdewantara, Oct 20, 2016 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #5
    My advice, use a media query to make the text freaking smaller so you aren't wasting three-quarters a screen worth of space on 7 lousy words.

    Word-wrap:break-word might help too since it will force a line-break when the word is too big to fit.

    Also, that logo needs some serious help in the "WCAG, what's that?!?" department.
     
    deathshadow, Oct 21, 2016 IP
  6. HIPVIE

    HIPVIE Greenhorn

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #6
    Thanks again, unfortunately, it's not working on my theme, or maybe I don't apply those correctly but I put the code in the main css on my theme, when I open on mobile, it's still the same. :(
     
    HIPVIE, Oct 21, 2016 IP
  7. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #7
    Put your related HTML + CSS code here for us to see.
    Or perhaps a URL link to your test page is better?
     
    hdewantara, Oct 21, 2016 IP
  8. HIPVIE

    HIPVIE Greenhorn

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #8
    Hi, I appreciate it but that's fine. I just let it as it's, no problem, thank you so much.
     
    HIPVIE, Oct 21, 2016 IP