How to I get Global CCS to ignore certain pages?

So I am trying to move the “classic collection” image so it is inline with the left edge of the ‘kensington burl dining’ text. I know how to do this using the code below in the custom css for that page:

a.x-img>img {
display: block;
margin-left: 0px;
}

However there are over 450 pages where this needs to be applied, this tag ‘a.x-img>img’ applies to every one of these images across the site. if there any way I can tell the global CSS to ignore the home page, contact us page etc? Using a page id or something? As i do not want this occuring on those pages.

Many Thanks!

Hi There,

Thank you for writing in, first please understand how the CSS :not pseudo class works.

Then read this post on How To Locate Post/Page IDs.

After that you should able to formulate a custom CSS that is look like this:

body:not(.page-id-xxxx) a.x-img>img {
	display: block;
	margin-left: 0px;
}

Where xxxx is the ID of your home or about page.

Hope it helps,
Cheers!