Re: Suggestion > CSS > Pseudo element > Container

Note: I accidentally replied only to pedro early in this thread. He
has replied to me, so I felt this should be included in the public
thread.


---------- Forwarded message ----------
From: Pedro Amaral Couto <pedro.amaral.couto@gmail.com>
Date: Tue, Sep 7, 2010 at 10:49 PM
Subject: Re: Suggestion > CSS > Pseudo element > Container
To: Matthew Ayres <solar.granulation@gmail.com>


On Mon, 2010-09-06 at 16:20 +0100, Matthew Ayres wrote:
...
> Sorry if I'm missing the obvious, but what would be the benefit of
> this?  How does it change or improve the functionality of CSS?

Sometimes I have to had wrappers using HTML elements for layout. And
that's what, for instance, YouTube and Blogger do:
«
<div id="masthead-container">
 <div id="masthead">
  ...
 </div>
</div>

...

<div id="footer-container">
       <div id="footer">
       ...
       </div>
</div>
»

"masthead-container" and "footer" aren't used for content or semantics.
They are used as a hack to work around a functionality that CSS lacks. I
found my self doing it. I wrote the HTML code, but when I'm writing CSS,
I found that I could not make the layout I wanted without modifying the
HTML code (I wanted to make a fixed dark header filling the whole
width). That's when I sent the suggestion. What are the benefits of
"before" and "after"? Those elements are very handy, but they're useless
on those cases.

Received on Tuesday, 7 September 2010 21:59:08 UTC