Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
net
net
news.announce
news.config
news.management
news.moderation
providers
providers.aaisp
web.authoring
  
 
date: Thu, 10 Jul 2008 08:15:01 -0700 (PDT),    group: uk.net.web.authoring        back       
Acceptable use of Divs?   
Hi,

Does anyone know or have an opinion on if it's acceptable to use the
div tag for normal text content instead of the p tag.

I've have several users moaning about the fact that my editor
"FCKEditor" is producing double lines when they press enter.  Simply
due to P tags having a some bordering space by default.  I can't
restyle them as it'll change too much existing content.  I have
considered using setting FCKEditor to produce Divs when enter is
pressed instead as this doesn't have the extra space but is it an
acceptable use of the tag or would it cause some accessibility issue
as it's pretty important for the sites it's used in.

Thanks for any information or opinions,
Dave
date: Thu, 10 Jul 2008 08:15:01 -0700 (PDT)   author:   unknown

Re: Acceptable use of Divs?   
dave.google@yougeezer.co.uk wrote:
> Hi,
> 
> Does anyone know or have an opinion on if it's acceptable to use the
> div tag for normal text content instead of the p tag.
> 
> I've have several users moaning about the fact that my editor
> "FCKEditor" is producing double lines when they press enter.  Simply
> due to P tags having a some bordering space by default.  I can't
> restyle them as it'll change too much existing content.  I have
> considered using setting FCKEditor to produce Divs when enter is
> pressed instead as this doesn't have the extra space but is it an
> acceptable use of the tag or would it cause some accessibility issue
> as it's pretty important for the sites it's used in.
> 
> Thanks for any information or opinions,
> Dave

Sounds like a bad idea to me.  Your editor should be producing code 
which is as standard as possible (validator!) and adhering to the 
principle that HTML tags indicate structure and CSS tags formatting.  It 
doesn't seem intuitive to me to have Enter create a new div.  A div is a 
"container" tag, meant (as I understand it) to allow common 
characteristics to be applied to the contents within.  If you wanted to 
layout four or five paragraphs of text (a quote, for example) you'd 
probably want a class for the paragraphs (for colour and font 
characteristics) and a containing div so that you could position it on 
the page.  It sounds as if you're thinking of distorting the conventions 
just to get around your users' dislike of browsers' built-in style 
sheets.  Or am I missing something?

Phil, London
date: Thu, 10 Jul 2008 16:33:42 +0100   author:   Philip Herlihy

Re: Acceptable use of Divs?   
On Jul 10, 4:33 pm, Philip Herlihy  wrote:
> dave.goo...@yougeezer.co.uk wrote:
> > Hi,
>
> > Does anyone know or have an opinion on if it's acceptable to use the
> > div tag for normal text content instead of the p tag.
>
> > I've have several users moaning about the fact that my editor
> > "FCKEditor" is producing double lines when they press enter.  Simply
> > due to P tags having a some bordering space by default.  I can't
> > restyle them as it'll change too much existing content.  I have
> > considered using setting FCKEditor to produce Divs when enter is
> > pressed instead as this doesn't have the extra space but is it an
> > acceptable use of the tag or would it cause some accessibility issue
> > as it's pretty important for the sites it's used in.
>
> > Thanks for any information or opinions,
> > Dave
>
> Sounds like a bad idea to me.  Your editor should be producing code
> which is as standard as possible (validator!) and adhering to the
> principle that HTML tags indicate structure and CSS tags formatting.  It
> doesn't seem intuitive to me to have Enter create a new div.  A div is a
> "container" tag, meant (as I understand it) to allow common
> characteristics to be applied to the contents within.  If you wanted to
> layout four or five paragraphs of text (a quote, for example) you'd
> probably want a class for the paragraphs (for colour and font
> characteristics) and a containing div so that you could position it on
> the page.  It sounds as if you're thinking of distorting the conventions
> just to get around your users' dislike of browsers' built-in style
> sheets.  Or am I missing something?
>
> Phil, London

To be honest I was thinking it was a bad idea and goes against the
standard.  But it's what I've been pushed into doing by others in my
team.  I agree that we're working around the conventions to make the
users happy.  If you know of any publications / drafts or other
examples that recommend against this it'd be really useful as I could
use it as evidence against the change.  As others in my team think
it's fine since "Bobby", the accessibility checking software, didn't
highlight any issues with it.

Dave
date: Thu, 10 Jul 2008 08:47:26 -0700 (PDT)   author:   unknown

Re: Acceptable use of Divs?   
Dave wrote
> Does anyone know or have an opinion on if it's acceptable to use the
> div tag for normal text content instead of the p tag.
>
> I've have several users moaning about the fact that my editor
> "FCKEditor" is producing double lines when they press enter.  Simply
> due to P tags having a some bordering space by default.  I can't
> restyle them as it'll change too much existing content.  I have
> considered using setting FCKEditor to produce Divs when enter is
> pressed instead as this doesn't have the extra space but is it an
> acceptable use of the tag or would it cause some accessibility issue
> as it's pretty important for the sites it's used in.
>
> Thanks for any information or opinions,

It seems like a bit of a 'marching-band' way of creating a double line 
break.

If you have a containing div and multiple <p>s inside it would make classing 
and styling of your paragraphs and other elements much neater;

div#master {width: 80%}
#master p {text-indent: 1em}
#master h1 {font-size: 200%}


-dE|_---
date: Fri, 11 Jul 2008 11:35:48 +0100   author:   dE|_

Re: Acceptable use of Divs?   
On Thu, 10 Jul 2008 08:15:01 -0700 (PDT), dave.google@yougeezer.co.uk
wrote in
:

>I've have several users moaning about the fact that my editor
>"FCKEditor" is producing double lines when they press enter.  Simply
>due to P tags having a some bordering space by default.

I assume from that description that what your editor is doing is
treating 'enter' as meaning "start new paragraph" and what the users are
seeing is not double lines but the gap between the old paragraph and the
new one.

To some extent the problem here is that the users do not understand what
is going on. Changing your editor so that 'enter' means "start new
generic block level element" is not likely to help with that.

You could make 'enter' mean "insert line break" and put in a <br> - that
might make it look the way the users expect but there is potential for
trouble later if your users have a concept of 'paragraph' that does not
match the structure of the document.

If your users are familiar with something like MSword, perhaps you could
make SHIFT/enter mean "insert line break" and 'enter' mean "start new
paragraph" and explain that unlike in Word, the default for web browsers
is that paragraphs have non-zero space before/after. If they have ever
adjusted paragraph formatting in Work they may be able to understand
what is going on and feel that it is reasonably familiar.

-- 
Owen Rees
[one of] my preferred email address[es] and more stuff can be
found at <http://www.users.waitrose.com/~owenrees/index.html>
date: Fri, 11 Jul 2008 12:23:10 +0100   author:   Owen Rees

Re: Acceptable use of Divs?   
"dE|_"  wrote in message 
news:6IGdk.190566$P83.93836@newsfe20.ams2...
>
>
> It seems like a bit of a 'marching-band' way of creating a double line 
> break.
>
> If you have a containing div and multiple <p>s inside it would make 
> classing and styling of your paragraphs and other elements much neater;
>
> div#master {width: 80%}
> #master p {text-indent: 1em}
> #master h1 {font-size: 200%}
>
>

This was the approach I was going to suggest... one DIV to group all 
affected paragraphs so that they can be styled independently of any other 
pages.
date: Fri, 11 Jul 2008 16:15:52 +0100   author:   CJM

Re: Acceptable use of Divs?   
On Fri, 11 Jul 2008 12:23:10 +0100, Owen Rees wrote:

> On Thu, 10 Jul 2008 08:15:01 -0700 (PDT), dave.google@yougeezer.co.uk
> wrote in
> :
> 
>>I've have several users moaning about the fact that my editor
>>"FCKEditor" is producing double lines when they press enter.  Simply due
>>to P tags having a some bordering space by default.
> 
> I assume from that description that what your editor is doing is
> treating 'enter' as meaning "start new paragraph" and what the users are
> seeing is not double lines but the gap between the old paragraph and the
> new one.
> 
> To some extent the problem here is that the users do not understand what
> is going on. Changing your editor so that 'enter' means "start new
> generic block level element" is not likely to help with that.
> 
> You could make 'enter' mean "insert line break" and put in a <br> - that
> might make it look the way the users expect but there is potential for
> trouble later if your users have a concept of 'paragraph' that does not
> match the structure of the document.
> 
> If your users are familiar with something like MSword, perhaps you could
> make SHIFT/enter mean "insert line break" and 'enter' mean "start new
> paragraph" and explain that unlike in Word, the default for web browsers
> is that paragraphs have non-zero space before/after. If they have ever
> adjusted paragraph formatting in Work they may be able to understand
> what is going on and feel that it is reasonably familiar.

That makes sense.  I use TinyMCE and that's how it works by default:

Return = <p></p>
Shift+Return = <br />
-- 
Andy Jacobs
date: Fri, 11 Jul 2008 12:22:36 -0500   author:   Andy Jacobs

Re: Acceptable use of Divs?   
On Fri, 11 Jul 2008 12:22:36 -0500, Andy Jacobs
 wrote:
>On Fri, 11 Jul 2008 12:23:10 +0100, Owen Rees wrote:

>> If your users are familiar with something like MSword, perhaps you could
>> make SHIFT/enter mean "insert line break" and 'enter' mean "start new
>> paragraph" and explain that unlike in Word, the default for web browsers
>> is that paragraphs have non-zero space before/after. If they have ever
>> adjusted paragraph formatting in Work they may be able to understand
>> what is going on and feel that it is reasonably familiar.
>
>That makes sense.  I use TinyMCE and that's how it works by default:
>
>Return = <p></p>
>Shift+Return = <br />

The X-Standard editor does the same too.

Also, according to the FCKEditor forums, so does FCKEditor ;-)
date: Fri, 11 Jul 2008 19:25:08 +0100   author:   Stuart Millington

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us