Jump to content

Excluding blog posts image block from CSS

Recommended Posts

Hi,

I have this small code on my web. The problem is that it is triggering all pictures from blog to be also alligned to the left and I would like to have them centered. Can anyone advise how to exclude all blog posts from the following below? Because for the rest of the website I would like to keep them left-aligned. 

// Left Align Images //

.sqs-block-image .intrinsic {
 margin-left: 0px !important;
 }

Thank you very much.

Link to comment
  • Replies 5
  • Views 924
  • Created
  • Last Reply

Try this

 

body:not(.collection-type-blog.view-item) {
	.sqs-block-image .intrinsic {
 		margin-left: 0px !important;
 	}
}

 

Link to comment

I've double checked my code using the code inspector on your site and the change I made is working. 

That particular rule does not get applied on blog posts but is applied elsewhere. 

However, it looks like that item already has margin-left set to zero so there is no visual difference whether or not the rule is applied. 

Link to comment

Archived

This topic is now archived and is closed to further replies.

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