Could someone assist me with rearranging blocks in Squarespace by utilizing CSS?

Greetings, fellow readers! After a period of silent observation, I am finally making my presence known.

My wife and I are in the process of creating her freelance services website. However, we have encountered a troublesome issue that has left me quite perplexed despite my persistent attempts to rectify it.

I've experimented with various combinations of CSS classes like .row, .sqs-row, .col, among others, in an effort to reorder the blocks on our website's mobile view, but alas, to no avail.

If you wish to visit the site, here's the URL: (password: yosydesign2021).

In the desktop version, the steps are displayed as follows:

1 2 3 4 5 6

For reference, here is the desktop view: desktop view

However, in the mobile view, the order appears jumbled:

1 4 2 5 3 6

Here are snapshots of the mobile view for further clarity: mobile view1 | mobile view2

The latest solution I attempted involved the following code snippet:

@media screen and (max-width:640px) {
 div#page-section-60482408b332ea04661c1cf0> .row .sqs-row {
    display: flex;
  flex-direction: column;
   
   
  }
 #block-25053f13e7adbb1c828d{order:2 !important;}
}

Despite multiple adjustments, this method failed to yield the desired outcome. While I grasp the need to apply the display:flex attribute before using the order property, it seems stubbornly resistant to functioning correctly.

Your assistance and guidance would be greatly appreciated, especially given my limited understanding of CSS.

Answer №1

When I copied the code for a grid section from the website mentioned in this link, I noticed that the ordering in the HTML was not sequential. The container labeled as 04 appeared right after the first one, and 05 came after the second. It seems like this was how the columns were structured to create a "grid" layout on Squarespace. After rearranging the elements in the correct order within the HTML, everything fell into place as expected.

If you prefer to maintain the out-of-order sequence in the HTML, you can utilize the order property to ensure the items are displayed in ascending order visually. However, it's essential to consider the following:

Using the order property may disconnect the visual presentation of content from the DOM order, impacting users with low vision who rely on assistive technologies like screen readers. If visual (CSS) order is crucial, screen reader users may not access the correct reading order.

.flex {
  display: flex;
  flex-wrap: wrap;
}

.flex div {
  margin: 1rem;
}

.one {
  order: 1;
}

.two {
  order: 2;
}

.three {
  order: 3;
}

.four {
  order: 4;
}

.five {
  order: 5;
}

.six {
  order: 6;
}
<div class="flex">
  <div class="one">
    <h2>01</h2>
    <h3>Get a Quote</h3>
    <p>some text</p>
  </div>
  <div class="four">
    <h2>04</h2>
    <h3>Project Development</h3>
    <p>some text</p>
  </div>
  <div class="two">
    <h2>02</h2>
    <h3>Schedule Your Project
</h3>
    <p>some text</p>
  </div>
  <div class="five">
    <h2>05</h2>
    <h3>Revisions</h3>
    <p>some text</p>
  </div>
  <div class="three">
    <h2>03</h2>
    <h3>Project Start</h3>
    <p>some text</p>
  </div>
  <div class="six">
    <h2>06</h2>
    <h3>Project Completion</h3>
    <p>some text</p>
  </div>
</div>

To add custom styling, it is recommended to use CSS Grid and arrange HTML elements in ascending order for optimal accessibility for those using assistive technologies to navigate through websites.

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin: 1rem auto;
  max-width: 110ch;
}

.grid div {
  text-align: center;
}
<div class="grid">
  <div>
    <h2>01</h2>
    <h3>Get a Quote</h3>
    <p>some text</p>
  </div>
  <div>
    <h2>02</h2>
    <h3>Schedule Your Project
</h3>
    <p>some text</p>
  </div>
  <div>
    <h2>03</h2>
    <h3>Project Start</h3>
    <p>some text</p>
  </div>
  <div>
    <h2>04</h2>
    <h3>Project Development</h3>
    <p>some text</p>
  </div>
  <div>
    <h2>05</h2>
    <h3>Revisions</h3>
    <p>some text</p>
  </div>
  <div>
    <h2>06</h2>
    <h3>Project Completion</h3>
    <p>some text</p>
  </div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The origin of the image is specified within the HTML document

I recently encountered an issue while trying to include images in my HTML file. When I used a local file path like background-image: url('file:///C:/Users/faycel/Desktop/site%20guide/paris.jpg'), the image displayed correctly. However, when I tri ...

Unable to display button image when using both id and style class in CSS

During my transition from Java 7 to Java 8, I've encountered a peculiar issue. Here's a brief explanation: In my FXML file, I have a button defined with style class button-red-big and id btnInput: <Button id="btnInput" fx:id="btnInput" align ...

Uniform Image Sizes in Bootstrap Carousel (With One Exception)

I am encountering a JavaScript exception related to image size. I am trying to set a fixed size for the images in my carousel, allowing them to auto adjust or resize without concern for distortion or pixelation. I have experimented with max-width and widt ...

Is there a way to prevent pop-up windows from appearing when I click the arrow?

Is there a way to display a pop-up window when the green arrow is clicked and then hide it when the arrow is clicked again? I tried using the code below but the pop-up window disappears suddenly. How can I fix this issue using JavaScript only, without jQue ...

Adjusting the tab size and space size to their default settings within VSCode

I'm currently facing an issue with my VSCode setup. I am trying to configure the space size to be equal to 1 and tab size to be equal to 2 as the default for every project. However, despite my efforts, it keeps reverting back to spaces: 4 for each new ...

The out directory is lacking Styled JSX integration for Next.js

I have a straightforward project in NextJs and I am looking to serve the files via NginX. Here are the dependencies listed in my package.json file: "dependencies": { "isomorphic-unfetch": "^2.0.0", "next": "^7.0.2", "next-routes": "^1.4.2", ...

Guide on transferring href parameter from the parent Vue component to the child component

Hey there! I've been working on creating a Vue page, breaking it down into components, and populating it with content from json. It all seems pretty straightforward, but I've hit a snag. Why is the href parameter not showing up in the right place ...

"Engaging with the touchscreen inhibits the triggering of click

Within this div, I have implemented touch-action:pan-y;. Surrounding this div is an anchor tag. If you click on the div, the link will successfully redirect. However, if you swipe on the div and then click, the link won't work on the first attempt bu ...

Conceal the Angular Bootstrap modal instead of shutting it down

I am utilizing Angular Bootstrap Modal to launch multiple modals, including a video player. http://angular-ui.github.io/bootstrap/#/modal My goal is to maintain the video's current position even when the modal is closed. This way, when I reopen the ...

The process of downloading a webpage onto a computer is not completely successful

I recently created a webpage on WIX and attempted to download it using CTRL+S. However, when I loaded the site from my computer, certain elements were not functioning properly. Is there a specific piece of code that is missing when saving the webpage in th ...

Achieve a CSS design similar to the Cinemax logo with angled background ends

Is there a way to customize the angle at which the ends of a background are cut off when using -webkit-transform: rotate(-#deg); and background selectors for tilted text with a background? I'm looking to achieve a design similar to the Cinemax logo. ...

The function assigned to [variable].onclick is not being executed, despite no errors being displayed in the console

I'm new to javascript and I'm looking for help with a simple task. I want to create a code that when clicking on an image, it will open in a modal. This feature is important for viewing full-size images on my portfolio. Although there are no erro ...

Svelte components loaded with no design aspects applied

I encountered an issue while trying to integrate the "Materialify" and "Carbon Components for Svelte" libraries into my Sapper project. The components seem to be loading, but without any associated styles. I followed the installation commands provided on t ...

What is the best way to insert a scroll into a section of a circular shape seamlessly?

Currently, my layout looks like this: https://ibb.co/iqaOXS However, I would like it to look more like this: https://ibb.co/eDkCRn The issue I'm facing is that the buttons are extending beyond the circular border. How can I prevent this from happeni ...

How can you ensure that text in a container automatically moves to a new line and causes the container to expand downward if necessary, when

Are you searching for a way to make text inside a container wrap to a new line and have the container expand downwards if needed? Update <div class="modal hide fade" id="modalRemoveReserve" style="display:none;"> <div class="modal-header"&g ...

The current page I'm working on is scrolling sideways, but I prefer a stationary layout without any scrolling

I am currently facing an issue with my webpage scrolling to the right. This behavior is not acceptable as web pages are not supposed to scroll to the right, correct? Could someone assist me in eliminating this unwanted scroll from my page? I have only u ...

Compressing CSS with the help of Gulp

Can anyone assist me with minifying my css in this gulpfile.js for compiling css? I have tried multiple code snippets from the internet but none of them seem to work. Your help would be greatly appreciated. Thank you. var gulp = require('gulp&apo ...

Create an eye-catching hexagon shape in CSS/SCSS with rounded corners, a transparent backdrop, and a

I've been working on recreating a design using HTML, CSS/SCSS in Angular. The design can be viewed here: NFT Landing Page Design Here is a snippet of the code I have implemented so far (Typescript, SCSS, HTML): [Code here] [CSS styles here] [H ...

The mobile-responsive dropdown navigation bar functions well on browsers with small widths, but does not work properly on my phone

I am experiencing an issue with the mobile responsive dropdown navigation bar on my website. It works perfectly fine on a small width browser, but when I try to open it on my phone, nothing happens. This is puzzling me as I am new to making websites respon ...

Generating alternate list items

I'm attempting to design a list style that resembles the one depicted in the image linked below: https://i.stack.imgur.com/U7vMw.jpg My issue is that when I try to add borders, they end up applying to the entire structure. .styled-list { list-st ...