When written as div#main-content it means that the ID must be contained by a div as in < div id="main-content>.
Can someone explain why they would use div#main-content instead of #main-content? It would help if you could give an example of a situation where div#main-content worked and #main-content did not.
Thanks
Marshall
6:46 am on Aug 22, 2007 (gmt 0)
Either or, id's are only to be applied once on a page. By putting the element type in from: div#whatever, it is limted to a <div> tag whereas #whatever can be applied to whatever you want. Make sense?
Marshall
yannis
5:20 pm on Sep 4, 2007 (gmt 0)
#main-content is the preferred way. Since it is an id it can only be used once on the page (presumably on an div)