This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > September 2005 > div vs p





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author div vs p
laura

2005-09-07, 7:33 pm

Hi,

Our company had a website built (it's almost done) and I will be maintaining
it via Dreamweaver MX2004 (but hopefully will upgrade to 8)

I am making some minor changes to text and have found that instead of using
<p> whenever there is a new paragraph, the <div class=> is used.

I wondered if that made sense? Shouldn't the <div class=> encompass the
whole area of text and within that tag, there would be <p> breaks?

Here's an example of what was done:

<div class="regtext">FuturosUSA le ofrece a usted la posibilidad de operar
los mercados de futuro en los Estados Unidos y Europa.</div>

<div class="regtext">Nuestra unica mision es que usted se sienta comodo
operando a traves de nosotros y queremos que nuestra operacion sea lo mas
sencilla y transparente para usted.</div>

<div class="regtext">Es por esto que nuestras comisiones son simples.</div>

<div class="regtext">FuturosUSA le ofrece a usted la posibilidad de operar
los mercados de futuro en los Estados Unidos y Europa.</div>

I'm thinking that it could simply be:

<div class="regtext">
<p>FuturosUSA le ofrece a usted la posibilidad de operar los mercados de
futuro en los Estados Unidos y Europa.</p>
<p>Nuestra unica mision es que usted se sienta comodo operando a traves de
nosotros y queremos que nuestra operacion sea lo mas sencilla y transparente
para usted.</p>
<p>Es por esto que nuestras comisiones son simples.</p>
</div>

Is it simply a matter of preference, or does one make sense over the other?

Thanks,

Laura


darrel

2005-09-07, 7:33 pm

> I am making some minor changes to text and have found that instead of
using
> <p> whenever there is a new paragraph, the <div class=> is used.
>
> I wondered if that made sense?


It makes no sense. A paragraph is a paragraph and, as such, should have
paragraph tags wrapped around it.

> I'm thinking that it could simply be:
>
> <div class="regtext">
> <p>FuturosUSA le ofrece a usted la posibilidad de operar los mercados de
> futuro en los Estados Unidos y Europa.</p>
> <p>Nuestra unica mision es que usted se sienta comodo operando a traves de
> nosotros y queremos que nuestra operacion sea lo mas sencilla y

transparente
> para usted.</p>
> <p>Es por esto que nuestras comisiones son simples.</p>
> </div>


That would work.

Though declaring a style for something 'regular' doesn't make a whole lot of
sense to begin with.

Why not just take the styles for regtext and apply it to the BODY tag?

-Darrel


Murray *TMM*

2005-09-07, 7:33 pm

Your way makes ever so much more sense. The original author of the page
clearly didn't understand exactly what he/she was doing....

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"laura" <lbarba@futuresworld.com> wrote in message
news:dfn5tl$cmj$1@forums.macromedia.com...
> Hi,
>
> Our company had a website built (it's almost done) and I will be
> maintaining it via Dreamweaver MX2004 (but hopefully will upgrade to 8)
>
> I am making some minor changes to text and have found that instead of
> using <p> whenever there is a new paragraph, the <div class=> is used.
>
> I wondered if that made sense? Shouldn't the <div class=> encompass the
> whole area of text and within that tag, there would be <p> breaks?
>
> Here's an example of what was done:
>
> <div class="regtext">FuturosUSA le ofrece a usted la posibilidad de operar
> los mercados de futuro en los Estados Unidos y Europa.</div>
>
> <div class="regtext">Nuestra unica mision es que usted se sienta comodo
> operando a traves de nosotros y queremos que nuestra operacion sea lo mas
> sencilla y transparente para usted.</div>
>
> <div class="regtext">Es por esto que nuestras comisiones son
> simples.</div>
>
> <div class="regtext">FuturosUSA le ofrece a usted la posibilidad de operar
> los mercados de futuro en los Estados Unidos y Europa.</div>
>
> I'm thinking that it could simply be:
>
> <div class="regtext">
> <p>FuturosUSA le ofrece a usted la posibilidad de operar los mercados de
> futuro en los Estados Unidos y Europa.</p>
> <p>Nuestra unica mision es que usted se sienta comodo operando a traves de
> nosotros y queremos que nuestra operacion sea lo mas sencilla y
> transparente para usted.</p>
> <p>Es por esto que nuestras comisiones son simples.</p>
> </div>
>
> Is it simply a matter of preference, or does one make sense over the
> other?
>
> Thanks,
>
> Laura
>



laura

2005-09-07, 7:33 pm

Since I do most of my work directly in Dreamweaver, I don't work with the
code as much. Since the pages are .php I looked into the code so I would
make sure not to delete something I shouldn't.

Apparently I have learned more stuff than I thought about css and normal
tags :)

I kinda thought that the regtext tag was unecessary, unless it's the fact
that the pages are .php? Forgot to mention that prevously.

Thanks so much!

Laura



"darrel" <notreal@hotmail.com> wrote in message
news:dfn68q$d9b$1@forums.macromedia.com...
> using
>
> It makes no sense. A paragraph is a paragraph and, as such, should have
> paragraph tags wrapped around it.
>
> transparente
>
> That would work.
>
> Though declaring a style for something 'regular' doesn't make a whole lot
> of
> sense to begin with.
>
> Why not just take the styles for regtext and apply it to the BODY tag?
>
> -Darrel
>
>



laura

2005-09-07, 7:33 pm

Thanks Murray!

Laura

"Murray *TMM*" <forums@HAHAgreat-web-sights.com> wrote in message
news:dfn6nc$e02$1@forums.macromedia.com...
> Your way makes ever so much more sense. The original author of the page
> clearly didn't understand exactly what he/she was doing....
>
> --
> Murray --- ICQ 71997575
> Team Macromedia Volunteer for Dreamweaver
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
> "laura" <lbarba@futuresworld.com> wrote in message
> news:dfn5tl$cmj$1@forums.macromedia.com...
>
>



Chris In Madison

2005-09-07, 7:33 pm

I think it's semantics, really. But your way does make the most sense from
a logical standpoint. If it's a paragraph, using the <p> makes the most
sense.

Best regards,
Chris


Thierry | www.TJKDesign.com

2005-09-07, 7:33 pm

laura wrote:
> <div class="regtext">
> <p>FuturosUSA le ofrece a usted la posibilidad de operar los mercados
> de futuro en los Estados Unidos y Europa.</p>
> <p>Nuestra unica mision es que usted se sienta comodo operando a
> traves de nosotros y queremos que nuestra operacion sea lo mas
> sencilla y transparente para usted.</p>
> <p>Es por esto que nuestras comisiones son simples.</p>
> </div>
>
> Is it simply a matter of preference, or does one make sense over the
> other?


Your way is better than the other, but I'd say that using a container for
the only prupose of styling some text is not the best way.
I'd go with <p class="regtext">
If you have many Ps to style this way, you should try to get to them through
elements already in the markup, for example:
..regtext,
#content p {}

And if you need to not style a few, then use a class on these.

--
Thierry | http://www.TJKDesign.com | CSS-P Templates + Articles:
CSS Popups, CSS 3 Column Layout, CSS Tabs, CSS Dropdown Menu,
TIP Method, Sliced Images, Clean Popup Windows, Easy Maintenance.....


Murray *TMM*

2005-09-07, 7:33 pm

Actually, I think the best would be like this -

<div id="styleThese">
<p>whatever</p>
</div>

and then use

#styleThese p { styles }

in the CSS.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Thierry | www.TJKDesign.com" <thierry@212utah.invalid> wrote in message
news:dfn8up$h8f$1@forums.macromedia.com...
> laura wrote:
>
> Your way is better than the other, but I'd say that using a container for
> the only prupose of styling some text is not the best way.
> I'd go with <p class="regtext">
> If you have many Ps to style this way, you should try to get to them
> through
> elements already in the markup, for example:
> .regtext,
> #content p {}
>
> And if you need to not style a few, then use a class on these.
>
> --
> Thierry | http://www.TJKDesign.com | CSS-P Templates + Articles:
> CSS Popups, CSS 3 Column Layout, CSS Tabs, CSS Dropdown Menu,
> TIP Method, Sliced Images, Clean Popup Windows, Easy Maintenance.....
>
>



Thierry | www.TJKDesign.com

2005-09-07, 7:33 pm

Murray *TMM* wrote:
> Actually, I think the best would be like this -
>
> <div id="styleThese">
> <p>whatever</p>
> </div>
>
> and then use
>
> #styleThese p { styles }
>
> in the CSS.


I believe semantic markup is the way to go, so I wouldn't use a wrapper just
for this. DIVitis is a decease ;)
Depending on the markup, I'd look for another solution...

--
Thierry | http://www.TJKDesign.com | CSS-P Templates + Articles:
CSS Popups, CSS 3 Column Layout, CSS Tabs, CSS Dropdown Menu,
TIP Method, Sliced Images, Clean Popup Windows, Easy Maintenance.....


Murray *TMM*

2005-09-07, 7:33 pm

If you can find another specific selector that would be preferable, sure.
I'm assuming such didn't exist.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Thierry | www.TJKDesign.com" <thierry@212utah.invalid> wrote in message
news:dfnb2m$k6t$1@forums.macromedia.com...
> Murray *TMM* wrote:
>
> I believe semantic markup is the way to go, so I wouldn't use a wrapper
> just
> for this. DIVitis is a decease ;)
> Depending on the markup, I'd look for another solution...
>
> --
> Thierry | http://www.TJKDesign.com | CSS-P Templates + Articles:
> CSS Popups, CSS 3 Column Layout, CSS Tabs, CSS Dropdown Menu,
> TIP Method, Sliced Images, Clean Popup Windows, Easy Maintenance.....
>
>



Thierry | www.TJKDesign.com

2005-09-07, 7:33 pm

Murray *TMM* wrote:
> If you can find another specific selector that would be preferable,
> sure. I'm assuming such didn't exist.


That's why I said it depends on the markup. To simplify the idea, if a style
needs to be applied to less than 50% of the Ps in a document, I'd apply a
class to the elements, if one needs to style more than 50% of the Ps then
I'd style the P element itslef and then use a class on the ones that must
not be styled.
Now, we could question why so many paragraphs need to be styled differently?
Usually, it's because they belong to different sections, and if it is the
case, there is a good chance we have a selector to use ;)

--
Thierry | http://www.TJKDesign.com | CSS-P Templates + Articles:
CSS Popups, CSS 3 Column Layout, CSS Tabs, CSS Dropdown Menu,
TIP Method, Sliced Images, Clean Popup Windows, Easy Maintenance.....

[color=darkred]
> "Thierry | www.TJKDesign.com" <thierry@212utah.invalid> wrote in
> message news:dfnb2m$k6t$1@forums.macromedia.com...


laura

2005-09-07, 7:33 pm

wow... you guys lost me a little... i seem to know just enough to get by
with... i'm going to look into what you are both suggesting. the basic <p>
for the whole site are the same. only where things need to be accented,
like headers or instructions we need to emphasize or stand out are what
should really be specially tagged from what i have been able to figure.

since most of the the <p> will be the same, then they should just get their
appearance from a main body tag. unfortunately most of the content is in
place and has been turned over to us.

since i'm going to be maintaining and all of the content has to be reviewed
again to make sure all the text is grammatically correctly áccented (it
being a spanish language website) i'll fix it so it's more consistent and
remove all those unnecessary <div class> tags on the paragraphs.

thanks for all your help everyone!

laura


"Thierry | www.TJKDesign.com" <thierry@212utah.invalid> wrote in message
news:dfnbri$l7i$1@forums.macromedia.com...
> Murray *TMM* wrote:
>
> That's why I said it depends on the markup. To simplify the idea, if a
> style
> needs to be applied to less than 50% of the Ps in a document, I'd apply a
> class to the elements, if one needs to style more than 50% of the Ps then
> I'd style the P element itslef and then use a class on the ones that must
> not be styled.
> Now, we could question why so many paragraphs need to be styled
> differently?
> Usually, it's because they belong to different sections, and if it is the
> case, there is a good chance we have a selector to use ;)
>
> --
> Thierry | http://www.TJKDesign.com | CSS-P Templates + Articles:
> CSS Popups, CSS 3 Column Layout, CSS Tabs, CSS Dropdown Menu,
> TIP Method, Sliced Images, Clean Popup Windows, Easy Maintenance.....
>
>
>
>



darrel

2005-09-07, 7:40 pm

> since most of the the <p> will be the same, then they should just get
their
> appearance from a main body tag. unfortunately most of the content is in
> place and has been turned over to us.


Yes. It makes more sense to declare the exception rather than the norm.

> since i'm going to be maintaining and all of the content has to be

reviewed
> again to make sure all the text is grammatically correctly áccented (it
> being a spanish language website) i'll fix it so it's more consistent and
> remove all those unnecessary <div class> tags on the paragraphs.


Do. And be sure to fire your web firm. ;o)

-Darrel


Michael Fesser

2005-09-07, 11:15 pm

..oO(laura)

>wow... you guys lost me a little... i seem to know just enough to get by
>with... i'm going to look into what you are both suggesting. the basic <p>
>for the whole site are the same. only where things need to be accented,
>like headers


'h1'...'h6' exist.

>or instructions we need to emphasize or stand out


'em' and 'strong' exist.

At least from reading the above there's IMHO no reason to style the
paragraphs differently, just add some markup where it makes sense.

Micha
Netvigator

2005-09-27, 10:15 pm

1) Don't waste your time to change what have been done only if it is
necessary.
2) Besides, though it is semantic one, but you can use it best.
Why don't use it to make style change more easily?

"laura" <lbarba@futuresworld.com> ¦b¶l¥ó
news:dfn5tl$cmj$1@forums.macromedia.com ¤¤¼¶¼g...
> Hi,
>
> Our company had a website built (it's almost done) and I will be

maintaining
> it via Dreamweaver MX2004 (but hopefully will upgrade to 8)
>
> I am making some minor changes to text and have found that instead of

using
> <p> whenever there is a new paragraph, the <div class=> is used.
>
> I wondered if that made sense? Shouldn't the <div class=> encompass the
> whole area of text and within that tag, there would be <p> breaks?
>
> Here's an example of what was done:
>
> <div class="regtext">FuturosUSA le ofrece a usted la posibilidad de operar
> los mercados de futuro en los Estados Unidos y Europa.</div>
>
> <div class="regtext">Nuestra unica mision es que usted se sienta comodo
> operando a traves de nosotros y queremos que nuestra operacion sea lo mas
> sencilla y transparente para usted.</div>
>
> <div class="regtext">Es por esto que nuestras comisiones son

simples.</div>
>
> <div class="regtext">FuturosUSA le ofrece a usted la posibilidad de operar
> los mercados de futuro en los Estados Unidos y Europa.</div>
>
> I'm thinking that it could simply be:
>
> <div class="regtext">
> <p>FuturosUSA le ofrece a usted la posibilidad de operar los mercados de
> futuro en los Estados Unidos y Europa.</p>
> <p>Nuestra unica mision es que usted se sienta comodo operando a traves de
> nosotros y queremos que nuestra operacion sea lo mas sencilla y

transparente
> para usted.</p>
> <p>Es por esto que nuestras comisiones son simples.</p>
> </div>
>
> Is it simply a matter of preference, or does one make sense over the

other?
>
> Thanks,
>
> Laura
>
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews