• i try to put the image of the 2 screens and the blobs (they are a single image) a little upper, usually i should make the position of the image absolute and the column holding the image position: relative; then i change the position of the picture by using left right top or bottom, for example right: 40%; or top:30%;… sadly when i manipulate the right or left position it behaves as i wish, but when i write top or bottom there are 2 cases, by writing top: *whatever value*%; nothing changes as if i have written nothing, and when i write bottom:*whatever value*%; the picture sticks on top of the block and no matter what the value i write nothing changes it only sticks on top of the block, i added top:60% !important; (for example) but nothing changes even by trying to force it, i am wondering if there is a code stopping that action from happening, if anyone could help me i would appreciate this ?? i really tried so many tricks, and when i write top: 60px; (for example) ;using pixels not pourcentage) i could see the change but i would love to add it in pourcentage because eitherway it wouldn’t be responsive
    ps: i use theme twenty twenty four

    • This topic was modified 7 months, 3 weeks ago by alaasaid.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The behavior you’re experiencing with top and bottom positioning in Twenty Twenty-Four theme can be attributed to the way the theme utilizes CSS grid layout. Here’s a breakdown of the situation and potential solutions:

    The Issue:

    • Twenty Twenty-Four heavily relies on CSS grid layout for its design structure. Grid containers (represented by .site or other specific class names) have an inherent “grid-placement: stretch” property by default, which stretches the content vertically to fill the container’s height.
    • When you set top: x%, you’re essentially telling the image to start from “x%” distance from the top of the grid container. However, due to the stretching behavior, the container itself expands to fill the available space, pushing the content, including your image, back down to the bottom.
    • Setting bottom: x% has the opposite effect. The image gets positioned relative to the bottom of the container, but again, due to stretching, the container adjusts its height, effectively keeping the image stuck at the top.

    Solutions:

    1. Utilize CSS Grid Properties:
      • Instead of using top or bottom, manipulate the grid placement of the image within the container using grid properties like grid-row-start and grid-row-end. These properties specify the starting and ending rows where the image should be positioned within the grid.
      CSS.image-container { display: grid; grid-template-rows: 1fr auto; /* Divide container into two rows */ } .your-image { grid-row-start: 1; /* Image starts in the first row */ /* Adjust grid-row-end for further positioning */ } Use code with caution.content_copy
    2. Clear the Default “grid-placement:
      • Override the default “grid-placement: stretch” behavior by explicitly setting it to “baseline” for the container element. This aligns the content to the baseline of the first row, allowing you to use top or bottom positioning more effectively.
      CSS.image-container { display: grid; grid-placement: baseline; } Use code with caution.content_copy
    3. Combine Techniques:
      • You can combine both approaches for more fine-grained control. Use grid properties for general placement within the grid and then use top or bottom with a specific pixel value for minor adjustments.

    Remember to adjust the class names and values (grid-row-start, top, etc.) according to your specific setup.

    Thread Starter alaasaid

    (@alaasaid)

    @dopeboy thank you so much for your fast reply, and thanks for helping

    i tried doing this solution
    .image-container { display: grid; grid-placement: baseline; }
    and it actually did work, but only for the desktop version, but for the mobile version, when the columns split and wrap, i face the exact same issue i had in the desktop version, i can manipulate the picture to move right and left, but not up and down, and when i write “top:..%” no move, and for the “bottom:..%” the image stucks at top, without any changement
    i tried the other solution

    .image-container { display: grid; grid-template-rows: 1fr auto; /* Divide container into two rows */ } .your-image { grid-row-start: 1; /* Image starts in the first row */ /* Adjust grid-row-end for further positioning */ }

    but i haven’t been really able to implement it even tho i did exactly as you told with changing the classes names, seems like i still need help

    • This reply was modified 7 months, 3 weeks ago by alaasaid.

    Alright. At this point I think it’s just a matter of making it responsive. If your site was responsive, you will have to attach this code to the appropriate classes and ID’s so that it can become responsive at once.

    Thread Starter alaasaid

    (@alaasaid)

    is there anywhere else i could contact you so maybe we could find a solution?

    in case of a yes, here is my discord @alaasaid

    Thread Starter alaasaid

    (@alaasaid)

    alulu#4194

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Picture manipulation in a column’ is closed to new replies.