champ
Members
-
Joined
-
Last visited
Reputation Activity
-
This ^
If a section is unique then there's no need to apply a class.
I often use a combination of ID's and classes and re-use a lot of styles to prevent repeating my code when it's not necessary. For example <div id="" class="">. It makes your code a lot easier to maintain.
-
I talked about this yesterday on this thread: http://www.webdesignerforum.co.uk/topic/68022-noob-alert-selecting-a-certain-a-tag-in-a-list/
In short - why use IDs instead of Classes for unique elements? Because it's more semantic to do so and IDs are required for Javascript interaction.
-
A DIV is just a container with the default shape of a box (a square or rectangle depending on the given width and height).
They are used to contain various sections of your website such as a product. You could have the name of the product, an image, a description as well as a rating all included within the DIV like this...
<div> <h3>Product Name</h3> <img src="path.jpg" alt="product image"> <p>Description of Product</p> </div>
That DIV contains all that information so if you wanted to move it all then you would just move DIV (the container that groups everything that's nested within).
I think you've got DIVs mistaken with IDs...