Jump to content

tuanphan

Circle Member
  • Posts

    64,744
  • Joined

  • Last visited

  • Days Won

    516

Posts posted by tuanphan

  1. On 4/9/2023 at 7:04 PM, RodyHuy said:

    Hello Tuanphan

    Thanks for the script. It works except there is a grey area at the top of the video when looking at a mobile (see attached image). Can you have a look?

    The video for mobile is on Vimeo (https://vimeo.com/815994215)

    Best

    Rodolphe

     

    IMG_7670.PNG

    Try this new code

    @media screen and (max-width:640px) {
    body.homepage .Parallax-item:first-child figure {
        transform: unset !important;
        top: 0 !important;
        bottom: 0 !important;
    }
    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;
    }
    }

     

  2. 5 hours ago, nickgardner400 said:

    Hi @tuanphan I am also trying to figure out how to make my homepage images only play when hovered. Could you explain how I need to go about doing this in Square space? I can send u my website. I just want the images to be still until you hover over with curser. thank you

    my portfolio

    https://www.nickgardnerportfolio.com/

     

    what I want it to do

    https://www.steptstudios.com/

    Ideal here is hover on each item >> replace current image with a gif or video (with code)

    If you have 19 items, we will need 19 code

    If you still want to do this, let me know, we can give the code

  3. 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;
    }
    }

     

  4. 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;
    }

     

  5. 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

  6. 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?

×
×
  • 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.