Multiple Use of a Division

B

bole2cant

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.
 
B

brucie

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 said:
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?
 
J

Jukka K. Korpela

bole2cant said:
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.
 
B

bole2cant

Jukka K. Korpela said:
The crystal ball says that you have id attributes in them. By HTML
definition, id attribute values must be unique within a document.
==================
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.
 
B

bole2cant

brucie said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top