Jump to content

tuanphan

Circle Member
  • Posts

    64,861
  • Joined

  • Last visited

  • Days Won

    517

Posts posted by tuanphan

  1. On 4/10/2023 at 3:11 PM, kinguyen said:

    Hi @tuanphan can you help me as well for my site please? I also would like to keep the video background playing on the desktop but switch to an image in mobile view. Thank you for your help. My site is: https://k-i.fi/ 

    Add to Design > Custom CSS. Replace Pixabay image with your image url

    /* video desktop image mobile */
    @media screen and (max-width:767px) {
    [data-section-id="633dc6e18d713b57d3e2ee1b"] .section-background>div {
        opacity: 0;
    }
    [data-section-id="633dc6e18d713b57d3e2ee1b"] .section-background {
        background-image: url(https://cdn.pixabay.com/photo/2023/03/18/16/26/ha-giang-7860907_1280.jpg);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }
    }

     

  2. On 4/9/2023 at 6:16 AM, sjkwon said:

    Thank you so much! Would I be able to use a similar Custom CSS to create the same black border around ALL images on different pages of the website (links below), please?  We would like to have border around all images of products with white background.

    https://www.renamegoods.com/

    https://www.renamegoods.com/shop/p/ummm-errrr-ahhhh-eco-tote-bag

    Use this new code

    /* Shop image border */
    .products.collection-content-wrapper .grid-item figure {
        border: 3px solid black;
    }
    /* homepage */
    body.homepage a.grid-item {
        border: 3px solid black;
    }
    /* products */
    div.ProductItem-gallery-slides {
        border: 3px solid black;
    }

     

  3. Add this to Settings > Advanced > Code Injection > Footer

    This code will get ALT from Image & add ALT text under image

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
    <script>
       $(function(){
    
       $('.gallery-item img[style]').each(function(){
           $el = $(this);
           var style = $el.attr('style');
           $el.attr('style','');
           $el.parent().attr('style',style);
        }); //Moves the inline styles
    
      $(".gallery-item img").each(function(){
                var title = this.alt;
              $('<div class="t-caption">'+ title +'</div>').insertAfter($(this).parent());
            });
     }); 
    </script>
    <style>
      #project .gallery .gallery-item {
        margin-bottom: 10px;
    }
    </style>

    image.png.c731980647c9826bc52d5abbaefa86c1.png

    image.png.3690b34fecc6c846b06bc4cf0666436a.png

  4. On 4/10/2023 at 12:35 AM, CMA said:

    I have exactly the same problem. When I display the landing page on sqaurespace itself, everything looks ok. If I visit my website via a web browser without using my squarespace account the Landing page image is way too big. I have also tried resizing the image, made no difference. I asked friends to view my page and it always looks too big for them also.

    I did try your code tuanphan, did not make a difference unfortunately.

    Any help, solutions or advice would be appreciated.

    Can you share link to your site?

  5. 15 hours ago, RodyHuy said:

    Hello Tuanphan

    Yes,  I have the issue on the mobile. I tried one of the script but it is not working.

    @media screen and (max-width:767px) {
    [data-current-styles*='"backgroundMode": "video"'] video {
        width: 100% !important;
        height: auto !important;
        left: 0 !important;
    }
    [data-current-styles*='"backgroundMode": "video"'] {
        min-height: unset !important;
        height: 30vh;
        margin-top: 5vh;
    }
    [data-current-styles*='"backgroundMode": "video"'] .html-block * {
        font-size: 30px;
        margin: 0;
        position: relative;
        top: -25px;
    }
    }

     Can you help? Is it possible to have a dedicated video for the mobile version. I have 2 different videos I would like to use. Would I need a specific script?

    Thanks

    Rodolphe

     

    Add to Design > Custom CSS

    @media screen and (max-width:640px) {
    body.homepage .Parallax-item:first-child iframe {
        width: 100% !important;
        height: auto !important;
        left: 0 !important;
        top: 0 !important;
    }
    section#videoss23 {
        min-height: unset !important;
        height: 250px;
    }
    body.homepage .Parallax-item:first-child {
        height: 200px !Important;
    }
    }

    Where is second video?

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.