Is CSS Grid supported for Zendesk Guide?

4 댓글

  • Ifra Saqlain
    Community Moderator

    It's working perfectly. 

    0
  • Rob Marks

    Thanks for confirming. After some experimentation I managed to get my wireframe working as expected.

    Do you have any advice about using grid? for example, if I was coding a site without using all the .hbs files, I could define a parent div and it could include my header and footer. Given that header and footer are separate .hbs files, is this still possible (ie. can I open the div in the header.hbs and close it in the footer.hbs?) or do I need to define a specific parent div for each of them.

    0
  • Ifra Saqlain
    Community Moderator

    Hey, you can add parent div via js code, you can try the below steps:

    1- Add the JQuery lib on your head file/document_head.hbs.

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

     2- Then add this given code on your JS file.

    $(document).ready(function (){
    $('head, body, footer').wrapAll('<div class="wrapper">');
    });

     

    I tried on default theme but you have different classes of header/footer/body so you can update in this; ('head, body, footer').

     

    Team

     

    0
  • Rob Marks

    Hi Ifra,

    That was exactly what I needed - thank you!

    Just as a leave behind for anyone who follows:

    Documentation on wrap all (with examples): https://api.jquery.com/wrapall/

    My specific implementation:

    Where header.hbs contains:

    home_page.hbs contains:

    footer.hbs contains:

    The result is:

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공