I use the <section> on several pages, but on the same page I use the <aside> , which is preceded by the <section> .
In the case where I have a <section> followed immediately by <aside> , I would like to apply the width to both and leave the float field to the left, and to the side - float right.
Basically, if I have <section> and <aside> , I want the style to work as follows:
section { width: 500px; float: left; padding: 8px; } aside { padding:8px; width:400px; float:right; }
If I have only <section> , I want this to look like:
section { padding: 8px; }
Is there a way to do this using a conditional statement in CSS3 or a pseudo-class, without having to use JavaScript, custom classes, or separate CSS files?
source share