Jump to content

Image alignment - CSS exception to general rule

Recommended Posts

Site URL: https://dandelion-tarantula-wd3n.squarespace.com/about-2

I've used some CSS to left align all the images on a site I'm designing, as follows:

 .sqs-block-image .design-layout-inline .intrinsic  {
  margin-left: 0;
}

But now I have a couple of images on the site that I would like to center align. Is there a way to do this in CSS?

The site is: https://dandelion-tarantula-wd3n.squarespace.com/ and the password is: 97Jf9iGQ4rRc$H&x.

Many thanks!

Link to comment
  • Replies 1
  • Views 163
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Just worked this out! Here's the CSS if anyone else needs it:

 .sqs-block-image:not(#block-yui_3_17_2_1_1637835061183_5096,#block-yui_3_17_2_1_1637838638129_11479,#block-yui_3_17_2_1_1637835290044_5334) .design-layout-inline .intrinsic  {
  margin-left: 0!important;
}

Just add your own block IDs between the brackets ( )

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

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