Forum How do I...?

Select a tag based on a class per page selection

gecko
Hi Guys,

I'm trying to select elements with a specific class and apply styles to it based on the page position ... ie left or right page.

Is it possible to select elements in this way? I'd like to be able to change position/alignment and move it out of the main flow and position it to the left or right in a 2nd column on the left or the right depending on the page it is on (pull-quotes). This could be at the top of the page, or half way down a page etc ( so not always the same vertical position ).

I managed to get it to work to the left or the right with a single style but need to be able to do it dynamically any suggestions would be greatly appreciated!

Thanks in advance,
T
mikeday
You cannot select elements based on the page they occur on, but you can use "float: inside | outside" and the margin-inside/margin-outside properties. These are equivalent to left/right, but refer to the inside or outside of a two page spread.