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.
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.