Forum How do I...?

apply css based on page side

jbarrus
I am trying to apply css attributes based on whether a div appears on a left page or a right page. I want a border to be on the outside (right for right page, left for left page). Is there some way to specify page side? Is there something like this?


.contentbody {
	padding-right: .125in;
	border-right: thin dotted black;
}

.contentbody:left {
	border-right: 0;
	border-left: thin dotted black;
}
mikeday
This isn't possible at the moment. There are margin-inside and margin-outside properties for controlling margins depending on whether the current page is left-facing or right-facing, and in the future we will add equivalent properties to control padding and borders in this manner also.