Home › Forums › CSS › Is html:before allowed? › Re: Is html:before allowed?
March 15, 2011 at 1:06 pm
#55542
ambrooks
Participant
@Fourize That would work, and was my backup plan, but the idea was to reduce the number of non-semantic elements as much as possible.
@fjorko Although I haven’t tried what your saying, it seems to me that the problem I was having was related to positioning/sizing my pseudo elements. Pseudo elements should work on any element…
What I ended up doing is add a wrapper div and centering the wrapper instead of body. Then I was able to use this same technique using body:before and body:after without any problems. It just seems like doing anything “fancy” to html is too much of an edge case, and asking for bugs.