Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > add line breaks through css?

Reply
Thread Tools

add line breaks through css?

 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      08-15-2005
"Greg N." <(E-Mail Removed)> wrote:

> I am going to mark up my navigation section as list items. I am going to
> style the individual list items as "list-style-type:none" in the first
> case, and "display:inline" in the second case.


If that solves your problem, then the problem was neither of those that you
presented. (I can see a problem _created_ by display: inline, since it
makes the links adjacent; whether it is a serious problem depends on the
link texts.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
 
Greg N.
Guest
Posts: n/a
 
      08-15-2005
Jukka K. Korpela wrote:

> If that solves your problem, then the problem was
> neither of those that you presented.


What are you talking about? I was looking for ways to present items line
by line, or, by changing the css only, side by side. That's what I
asked for, and that's what does it.

> (I can see a problem _created_ by display: inline,
> since it makes the links adjacent;


No it does not. For me. Under IE and FF.

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/
 
Reply With Quote
 
 
 
 
Safalra
Guest
Posts: n/a
 
      08-15-2005
Greg N. wrote:
> Jukka K. Korpela wrote:
> > (I can see a problem _created_ by display: inline,
> > since it makes the links adjacent;

>
> No it does not. For me. Under IE and FF.


Unfortunately many badly implemented user-agents whose programmers were
unfamiliar with the concept of 'usability' decided not to render
whitespace between consecutive links, making them appear as one long
link to the poor user.

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/usability/

 
Reply With Quote
 
Greg N.
Guest
Posts: n/a
 
      08-15-2005
Safalra wrote:

> Unfortunately many badly implemented user-agents ...
> decided not to render whitespace between consecutive links,
> making them appear as one long link to the poor user.


Ok. Interesting. I have put spaces (&nbsp between my links.
That means I'm safe in this regard, no?

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/
 
Reply With Quote
 
Safalra
Guest
Posts: n/a
 
      08-15-2005
Greg N. wrote:
> Safalra wrote:
> > Unfortunately many badly implemented user-agents [snip]
> > decided not to render whitespace between consecutive links,
> > making them appear as one long link to the poor user.

>
> Ok. Interesting. I have put spaces (&nbsp between my links.
> That means I'm safe in this regard, no?


Alas, no. Take a look at the Web Content Accessibility Guidelines:

http://www.w3.org/TR/WCAG10-TECHS/#tech-divide-links

Specifically: "Until user agents (including assistive technologies)
render adjacent links distinctly, include non-link, printable
characters (surrounded by spaces) between adjacent links."

In other words, the characters must be printable. The standard is to
put a 'pipe' (the | character) between the links, and you've probably
noticed this on many websites (take a look at the top of
http://www.w3.org/ itself for example).

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/usability/

 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      08-15-2005
Gazing into my crystal ball I observed "Safalra" <(E-Mail Removed)>
writing in news:(E-Mail Removed) ups.com:

>> Ok. Interesting. I have put spaces (&nbsp between my links.
>> That means I'm safe in this regard, no?

>
> Alas, no. Take a look at the Web Content Accessibility Guidelines:
>
> http://www.w3.org/TR/WCAG10-TECHS/#tech-divide-links
>


<snip>

>
> In other words, the characters must be printable. The standard is to
> put a 'pipe' (the | character) between the links, and you've probably
> noticed this on many websites (take a look at the top of
> http://www.w3.org/ itself for example).
>


<facetious>And that sounds good too </facetious>
Activities vertical bar Technical Reports vertical bar Site Index ...

If it's a list of links, mark it up as a list, use CSS to style it.



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
Greg N.
Guest
Posts: n/a
 
      08-17-2005
Safalra wrote:

> Take a look at the Web Content Accessibility Guidelines:
>
> http://www.w3.org/TR/WCAG10-TECHS/#tech-divide-links
>
> Specifically: "Until user agents (including assistive technologies)
> render adjacent links distinctly, include non-link, printable
> characters (surrounded by spaces) between adjacent links."
>
> In other words, the characters must be printable. The standard is to
> put a 'pipe' (the | character) between the links, and you've probably
> noticed this on many websites (take a look at the top of
> http://www.w3.org/ itself for example).


I have now implemented what my initial intention was, namely, to use the
same list markup but different CSS to display my navigation section in
either block format:
http://hothaus.de/greg-tour-2003/fyrom.htm
or in inline format:
http://coolhaus.de/iv/03/iv.php?widt...g/xl-x2_32.jpg

Now, I have read the atricle about the adjacent links problem, but I am
still wondering if I really should take the trouble to deal with it.
For one, it would mean to depart from my current page layout. Also, I
really have no good judgement how serious (in terms of number of users
affected) the problem really is.

The problem does *not* appear on IE, FF, and Opera, anyway.

I am using a hover effect on my links that allows to distinguish
individual links even if a defective UA strings them together.

I suspect that users of such defective UAs know about the problem and
don't get confused, especially when aided by a hover effect.

The Accessibility Guidelines document says that tis is a low priority
issue, which "may" (not "should") be addressed.

I have a much more serious accessability problem anyways: This is kind
of a photo album application, and due to the amount of image data (up to
half a megabyte per page) it is not really well accessible for people on
slow connections. I guess I'm losing a sizable percentage of potential
visitors due to this fact anyway.

This may sound like heresy to an acessability missionary, but I'm
wondering, given all these facts, if a minor defect in some rare UAs
deserves that amount of pampering.

Question:

Do you know which UAs have the problem, so I can have a look at my logs
and try to find out what the magnitude of the problem is?

Thanks,
Greg

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/
 
Reply With Quote
 
Safalra
Guest
Posts: n/a
 
      08-17-2005
Greg N. wrote:
> Safalra wrote:
> > [about problems with adjacent links]

> [snip]
> I have a much more serious accessability problem anyways: This is kind
> of a photo album application, and due to the amount of image data (up to
> half a megabyte per page) it is not really well accessible for people on
> slow connections. I guess I'm losing a sizable percentage of potential
> visitors due to this fact anyway.
>
> This may sound like heresy to an acessability missionary, but I'm
> wondering, given all these facts, if a minor defect in some rare UAs
> deserves that amount of pampering.


Obviously major issues should be dealt with before minor issues. I was
just being fussy...

> Do you know which UAs have the problem, so I can have a look at my logs
> and try to find out what the magnitude of the problem is?


As far as I know it's mainly the text-based user-agents like Lynx and
Links. For most websites they only form a tiny percentage of the visits
(on my site, for example, they form only ~0.01% of the hits judging by
user-agent strings).

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/usability/

 
Reply With Quote
 
kchayka
Guest
Posts: n/a
 
      08-17-2005
Greg N. wrote:

> Safalra wrote:
>
>> http://www.w3.org/TR/WCAG10-TECHS/#tech-divide-links
>>
>> Specifically: "Until user agents (including assistive technologies)
>> render adjacent links distinctly, include non-link, printable
>> characters (surrounded by spaces) between adjacent links."

>
> I have now implemented what my initial intention was, namely, to use the
> same list markup but different CSS
>
> Now, I have read the atricle about the adjacent links problem, but I am
> still wondering if I really should take the trouble to deal with it.


IMO, you have already dealt with "the adjacent links problem" by using
list markup. The list marker can provide the non-link, printable
character, even if you hide it via CSS. Using good, semantic markup is
better for creating accessible pages than adding kludges like
superfluous content just to satisfy some old, maybe obsolete, guideline.

Note that the W3C mentions "Until user agents [do such-and-such]..." and
that those guidelines are more than 6 years old. User agents have come a
long way since then, especially those in the assitive technology (AT)
category.

> Do you know which UAs have the problem, so I can have a look at my logs
> and try to find out what the magnitude of the problem is?


Even if 50% of your visitors use some sort of AT, you may find no record
of it in your logs. The most-used screen readers use IE as a rendering
engine, and just identify themselves as IE.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      08-17-2005
kchayka <(E-Mail Removed)> wrote:

> IMO, you have already dealt with "the adjacent links problem" by using
> list markup. The list marker can provide the non-link, printable
> character, even if you hide it via CSS.


It can, but does it?

I suppose you are thinking of a speech browsers that interprets the HTML
source and ignores any CSS (or applies aural features in CSS, in the remote
future). In such a case, list markup is sufficient.

But it is common to use speech browsers that work "upon" graphic browsers,
reading aloud what appears on screen (by checking what characters the I/O
routines send onto screen). They are completely ignorant of the HTML markup
as such; they only "see" the document as formatted with CSS.

> Note that the W3C mentions "Until user agents [do such-and-such]..."
> and that those guidelines are more than 6 years old. User agents have
> come a long way since then, especially those in the assitive technology
> (AT) category.


Unfortunately, the progress has been slow.

But there's more. Think about seeing, on a graphic browser, links like

foo bar zap zip zap zup ump

Are there seven links, or less? Maybe "foo bar" is one link? If links are
underlined, breaks in underlining may give a hint. Too subtle?

There are various approaches to such problems, and you might ultimately
decide to ignore some of the problems. But separating adjacent links is
still an issue, and will always be.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginner: read $array with line breaks line by line Marek Stepanek Perl Misc 12 09-02-2006 10:27 AM
Add paragraph breaks in textarea ThunStorm Javascript 2 03-09-2006 08:58 PM
Force multi line field value to output with line breaks? bernadou ASP .Net Web Controls 2 01-23-2006 01:23 PM
Re: javascript causing line breaks PJ ASP .Net 1 08-04-2003 12:56 AM
Parse an xml file with line breaks in the beginning Raj Mudaliar Perl 0 07-14-2003 06:00 PM



Advertisments