• Resolved johnatanasoff

    (@johnatanasoff)


    Hi guys,

    I want the text slider on desktop screens to be bigger, but on mobiles to be smaller!
    What do i do?

    This should be simple, but I don’t know how to do it yet…

    Someone told me i need “@media queries” for this particular scenario, but didn’t give me the code.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I recommend asking at https://www.ads-software.com/support/theme/onetone#new-post so the theme’s developers and support community can help you with this.

    Thread Starter johnatanasoff

    (@johnatanasoff)

    @sterndata Thanks Steve! Although from my limited understanding, I think this question is not theme related, but universal, and css related.

    Lets see if someone drops a suggestion.

    You would put the css for mobile within a media query. Example

    @media screen and (max-width : 400px) {
      section.homepage-slider h1 {
        font-size : 20px !important;
      }
    }
    Moderator bcworkz

    (@bcworkz)

    The reason Steve suggested you ask through your theme’s support is the slider text styling is inlined, which is difficult to override with additional CSS, especially when the !important modifier is used. This inline style is generated by your theme. Your theme may have a simple way to change or adjust the styling. Your theme’s developers and support community are in the best position to help you with this.

    So yes, your question is seemingly universal, but how it’s implemented is theme specific. You should go ahead and try chits98’s suggestion, placed in the Additional CSS panel of the customizer. If it doesn’t work, your next best option is as Steve suggested.

    Thread Starter johnatanasoff

    (@johnatanasoff)

    @chits98 That worked! ?? Thanks a lot!

    I had it wrong!
    Btw i noticed the code works closing with just one curly brace }
    Is it important to have two?

    Thread Starter johnatanasoff

    (@johnatanasoff)

    @bcworkz

    Never questioned Steve’s suggestion!
    And ye what you said make’s sense regarding the best approach as the inline style is generated by the theme. Didn’t know that! And really thought it was universal.
    CSS is CSS…

    Still; for now, as long as it works (and it did), i’m happy! ??

    Moderator bcworkz

    (@bcworkz)

    It’s all good ?? The goal is to solve your issue. You are right, CSS is universal. But how it’s implemented in WP is not always so obvious, it’s largely in the realm of themes.

    You should always balance delimiters (I can think of a few non-CSS exceptions though) Even though it works unbalanced, the error could impact additional CSS you may add after the error.

    @johnatanasoff yes, you need the second closing brace. All css rules for mobile view can be included within the outer braces. Without closing the outer brace any regular css rule that you add below will not be applied properly.

    Thread Starter johnatanasoff

    (@johnatanasoff)

    @bcworkz

    Even though it works unbalanced, the error could impact additional CSS you may add after the error.

    Yes; with time i’m already realizing of good practices ??

    Thread Starter johnatanasoff

    (@johnatanasoff)

    @chits98 Noticed that ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘@media queries for text size in desktop and mobile.’ is closed to new replies.