1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Media queries CSS doesn't work for text size

Discussion in 'Free Divi Community Forum' started by Brian Smith, Nov 13, 2021.

  1. Brian Smith

    Brian Smith New Member

    Hello,

    I created a slider using slick.js with several call to action modules on the same row.

    I first positioned everything from within Divi (button position, text size for desktop, tablet and smartphone screens, margin-top ...). It works fine but when I change the title from H2 (by default) to H3, the margin-top is not working anymore, like it was disables or unrecognized by Divi.

    Even if I add some code in the advanced > customize CSS > Tile field, it's not recognized at all.

    I need to change the CTA title to H3 because I have a text title above as a H2.

    First I added this class to my sole column : h3-header-title

    Then I tried to add some CSS media queries code which is :

    <style>
    @Media all and (min-width: 1627px) {
    .h3-header-title .et_pb_promo_description .et_pb_module_header {
    margin-top: -100px!important;
    }}
    @Media all and (min-width: 1405px) and (max-width: 1626px) {
    .h3-header-title .et_pb_promo_description .et_pb_module_header {
    margin-top: -90px!important;
    font-size: 28px!important;
    }}
    </style>

    Here the margin-top is working (it doesn't work if I remove the .et_pb_promo_description), but there is no impact at all on the text size (by default it's set at 38px in Divi for Desktop screen size) !!

    I also changes @Media all by @Media only screen without any success.

    Thank you for your help.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade card carousel design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    Kindly share your URL.