You are here: Re: in css, after pseudoclass doesn't work with br tag? « HTML « IT news, forums, messages
Re: in css, after pseudoclass doesn't work with br tag?

Posted by Jukka K. Korpela on 09/23/07 11:28

Scripsit AlexG:

> is there some way to make it work?

"It"? It is bad style to imply the heading in text - in books, in journals,
on web pages, in e-mail, in Usenet postings, etc. You are supposed to write
the message body so that it can be understood without the heading (Subject
line).

> generally, i am trying to find a way to get my print stylesheet to
> eliminate line breaks and replace them with the pipe character "|".

That's a very vague idea, and sounds extremely odd. So if there's a
paragraph, hundreds of words long, you would want it to be printed as one
line, with just "|" where a line break would appear in some unspecified
situation.

I'm pretty sure you have misanalyzed your original problem. Care to share it
with us? If not, whatever you get is almostly surely not the right answer to
your real problem, though it might be a right answer to some other problem.

> I figured that i would use br{display:none} and br:after{content:"|"}
> to accomplish these goals, but the latter line of code fails to work.

Now you seem to consider only the effect of <br> markup, not line breaks in
general.

Then you can indeed make <br> ineffective (even on IE) using
br{display:none}. The other idea suffers from a few problems like
1) IE does not grok :after at all
2) by CSS specs, the content of br:after is part of the content of br (so it
has no impact when br has display:none)
3) if you remove br{display:none}, then br:after{content:"|"} _should_ have
the desired effect, overriding the default of br:after{content:"\0A";}, but
no browser gets this right, and they get it wrong in different ways.

Again, the real problem is something different, and its correct solution
probably involves some other markup.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация