Getting properties from grand-parent

M

Martin Magnusson

Is there a way to inherit something from a grand-parent of a CSS
element, skipping the parent?

What I'm aiming at is that I have my main text flow in a div with
specified width and margins, and I would like some elements (headings)
to extend outside that main div. On the left side, it is easy, since I
have a specified margin-left, and I can just use a negative margin for
the heading. On the right side, it is trickier. If I use a hard-coded
negative margin-right, the headings won't adjust to different window
widhts. Setting width:100% makes the rightmost end stay within the
containing div. Is it possible to make the heading 100% wide with
respect to the window/body instead of its container?

This is no big deal, but if it's possible, I'd like to know how to do it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top