How to repeat these records?

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

Hello,

I am displaying some content on a web page like this:
<div id="content">
<div id="main">...</div>
<div id="contacts">...</div>
</div>

The information is organized using the 2 div's inside "content" div.
I use the CSS classes' #content, #main and #contacts to format the
div's.

I want to repeat the "content" DIV to display 20 database records.
After I apply the Repeater I will have 20 DIV's with id="content", ...

So I did this:
<div id="content-<%# ds.FieldValue("id", Container) %>" class="content">
(and the same for all the other div's)

You can see that I needed to change the CSS class to a CSS style:
#content {...} became .content {...}

Why? Because each DIV becomes id="content-1", id="content-2", ...

Now I get a successful W3C validation but I am not able to apply a
class.

HOW CAN I solve this so I can still apply the CSS classes?

Thanks,
Miguel
 

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,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top