473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CSS pseudo-element first-line no work

Hi,

I am having trouble with CSS in that I can't
get the pseudo-element 'first-line' to work.

I have some pages that contain dialog. I use
a <dlfor this, with the character's name in
a <dtfollowed by the words in a <dd>. This
is rendered as I wish with the first line not
indented, the following lines indented, and no
leading (whitespace) between the two.

However, it is bad practice to use HTML tags
for layout; layout should be in the style
sheet. So I thought I would use the CSS
pseudo-element 'first-line' to mimic the <dl>
layout. Here is a test page:

http://members.tripod.com/martin_leese/Marvin/test.html

I have viewed this using Firefox 1.5,
Netscape 7.02, and IE 5.50. Only Netscape
appears to work, and only for
class="dialogmargin".

Can somebody please explain what I am doing
wrong here.

--
Many thanks,
Martin Leese
E-mail: pl****@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
Jan 6 '08 #1
2 2423
Jonathan N. Little wrote:
Martin Leese wrote:
>Hi,

I am having trouble with CSS in that I can't
get the pseudo-element 'first-line' to work.
....
>I have viewed this using Firefox 1.5,
Netscape 7.02, and IE 5.50. Only Netscape
appears to work, and only for
class="dialogmargin".

Can somebody please explain what I am doing
wrong here.

Well firstly, no way, no how IE 5.50 will work because it does not
support :first-line pseudo element, (as well as many other CSS
properties). AS I recall FF1.5 supported it but all these browsers are
*old*, Firefox is at 2.0.0.11 with 3 soon to be release and Netscape is
officially dead and buried!
Some people consider support of older
browsers to be a good thing.
Anyway there is an easier way, 2 classes.
This way it will work in these ancient browsers
....
div.orator { margin: 0 1em; }
div.dialog { margin: 0 1em 1em 3em; }
This looks good; many thanks. I finally
settled on:
p.char {margin-bottom: 0}
p.dialog {margin-top: 0; margin-left: 40px}
Follow up to: comp.infosystems.www.authoring.html
I don't have any NG listing: alt.html.css
I do, so I have put it back :-)

--
Thanks again,
Martin Leese
E-mail: pl****@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
Jan 10 '08 #2
Martin Leese wrote:
Jonathan N. Little wrote:
>>
Well firstly, no way, no how IE 5.50 will work because it does not
support :first-line pseudo element, (as well as many other CSS
properties). AS I recall FF1.5 supported it but all these browsers are
*old*, Firefox is at 2.0.0.11 with 3 soon to be release and Netscape is
officially dead and buried!

Some people consider support of older
browsers to be a good thing.
1. support != look the same

2. The number of IE 5.x users has dwindled to tiny numbers, less than 1%
at sites I monitor. It's not worth the effort to try and coerce its
deficient CSS to give comparable results as more modern browsers. If it
degrades gracefully and the result is usable, good enough. The same
should hold true for any other browser, too.

3. Firefox versions prior to 2.0 are in much the same boat as IE 5.x,
especially since Fx automatically updates itself now. Graceful
degradation and usability are the keys. If you don't have them, you may
have bigger problems with the design as a whole.
>I don't have any NG listing: alt.html.css

I do, so I have put it back :-)
Never heard of alt.html.css myself. Consider the sister group to
ciwa.html: comp.info.www.authoring.stylesheets

--
Berg
Jan 10 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James Stroud | last post by:
Hello All, Because of my poorly designing a database, I have recently found it necessary to explore the wonders of the Python pseudo-switch: do_case = { "A" : lambda x: x, "B" : lambda x: x,...
1
by: imani_technology | last post by:
My new employer is CMM Level 3. As part of the CMM/Personal Software Process, I am required to create pseudo code for my stored procedure and UDF design. Has anyone done this? If so, can anyone...
1
by: FC | last post by:
Hello folks, anyone who knows if the hover pseudo class applies only to anchor (<A/>) elements or to basic shapes as well? In either case I could not find a way to get Adobe SVG Viewer 3.0 to...
1
by: Erik Wahlstrom | last post by:
I have an XML document that includeds a UTF-8 BOM (0xEF 0xBB 0xBF). The document is properly encoded as UTF-8. However the XMLDecl encoding pseudo attribute indicates 'ISO-8859-1'. So how SHOULD...
4
by: Stephen Poley | last post by:
The issue of the focus pseudo-class came up a few weeks ago, and I finally got around to trying it out (better late than never ...) The recommended order given for the pseudo-classes is link,...
8
by: Kerberos | last post by:
As you might know, IE doesn't support the :hover pseudo-class on every tag (just the "a" tag AFAIK) Is there a simple JavaScript that would solve the problem? I have images that have a light blue...
1
by: Steven T. Hatton | last post by:
ISO/IEC 14882:2003: "5.2.4 Pseudo destructor call The use of a pseudo-destructor-name after a dot . or arrow -> operator represents the destructor for the non-class...
70
by: Ben Pfaff | last post by:
One issue that comes up fairly often around here is the poor quality of the pseudo-random number generators supplied with many C implementations. As a result, we have to recommend things like...
3
by: yawnmoth | last post by:
I've seen a few webpages that use the javascript pseudo-protocol with event handlers. eg. <input onkeyup="javascript: ..." /> Correct me if I'm wrong, but isn't onkeyup always supposed to be...
3
by: bytehunter | last post by:
Hello, I hope this is the best place to ask my question. I was wondering if there was such a thing as a pseudo terminal in Windows. For those unfamiliar, in Linux/Unix one can create a pseudo...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.