New Landing How can we help? Themeforest Theme Support Dante adding a class to a model

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #183711
    stevanl
    Member
    Post count: 4

    Hello
    I have a number of modals on a single page, they are also used on multiple pages. I would like to know how to add a CSS class to a modal so I can then style the header and body of the modal.

    Currently I am using
    .page-id-317 #modal-3 .modal-body, {
    padding:0px;
    }

    which works but I would then have to use a selector for every page that model is on.

    I am sure there is a better way.

    Thanks

    #183712
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    In that case just remove the page id.

    
    #modal-3 .modal-body, {
    padding:0px;
    }

    Give it a try.

    -Rui

    #183722
    stevanl
    Member
    Post count: 4

    Hi Rui

    Am I right in saying this will target every 3rd modal on all pages. As some of the 3rd modals on other pages have another purpose and a different design not sure how helpfull removing the page id will be.

    #183741
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    In that case you will have to do it like this for all the pages where you use it.

    
    .page-id-317 #modal-3 .modal-body, .page-id-318 #modal-3 .modal-body{
    padding:0px;
    }

    -Rui

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register