Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Multiple Use of a Division (http://www.velocityreviews.com/forums/t153559-multiple-use-of-a-division.html)

bole2cant 06-24-2003 08:49 PM

Multiple Use of a Division
 
Is there a way to use a division twice on a page without duplicating its
attributes under a new name in the stylesheet?

I'm converting from table layout to div layout. The div's at the bottom of the
page are exactly the same as the div's at the top of the page--non-div content
in between. Validating gives two errors for each repeated div.
--
-Doug



brucie 06-24-2003 09:13 PM

Re: Multiple Use of a Division
 
In post <bdae56$q12$1@terabinaries.xmission.com>
bole2cant said...

> Is there a way to use a division twice on a page without duplicating its
> attributes under a new name in the stylesheet?


give the <div>s the same class if they use the same CSS

> I'm converting from table layout to div layout. The div's at the bottom of the
> page are exactly the same as the div's at the top of the page--non-div content
> in between. Validating gives two errors for each repeated div.


URI?

--
brucie a. blackford. 25/June/2003 07:12:48 am kilo.
http://loser.brucies.com/

Jukka K. Korpela 06-24-2003 09:18 PM

Re: Multiple Use of a Division
 
"bole2cant" <sherwin@xxxmission.com> wrote:

> Validating gives two errors for each repeated div.


The crystal ball says that you have id attributes in them. By HTML
definition, id attribute values must be unique within a document.

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



bole2cant 06-24-2003 10:12 PM

Re: Multiple Use of a Division
 

"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote in message
news:Xns93A529B85466jkorpelacstutfi@193.229.0.31.. .
> "bole2cant" <sherwin@xxxmission.com> wrote:
>
> > Validating gives two errors for each repeated div.

>
> The crystal ball says that you have id attributes in them. By HTML
> definition, id attribute values must be unique within a document.
> --
> Yucca, http://www.cs.tut.fi/~jkorpela/
> Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
>

==================
At this point I don't know the proper terminology but I think you are telling
me that YES I must repeat the same attributes in the stylesheet as
div#right{...} AND div#rightftr{...} .
i.e.,
div#right{...} cannot be used as
<div id="right"> twice on the same page.

Thanks.
--
Doug




bole2cant 06-25-2003 04:17 AM

Re: Multiple Use of a Division
 
"brucie" wrote:

> change the id (#) to a class (.)
> div.right{...}
> <div class="right">
> you can then use the '.right' class as many times as you like in the
> page.


=====================

That is the information I needed. I changed them and all is well.
(Well, except for the •)

Thanks, Brucie. I appreciate your help.
--
-Doug in Utah
www.xmission.com/~sherwin/





All times are GMT. The time now is 09:15 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57