lorie
05-26-2007, 06:38 PM
Tell me if I am understanding this separation between presentation and content correctly:
My site has a section where artwork by certain artists is featured. Currently, a typical page would look like this (between appropriate DOCTYPE, <html></html> etc block, of course):
<h1>Artist Name</h1>
<p class="pic1"> </p><!-- "pic1" is an image used as a decorative divider -->
<p class="alignCenter"><img src="pix/featuredWork.jpg" width="700" height="879" alt="" /></p>
<h3 class="alignCenter">“The Featured Work”</h3>
<p class="tightenTop alignCenter">(1832)</p>
<p class="indentDbl">Some information about the featured artwork or the person portrayed.</p>
<p class="indentDbl">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus elit tellus, auctor in, aliquet ac, faucibus ut, ante.</p>
<p class="indentDbl">Mauris bibendum dignissim odio. Donec ullamcorper, quam vitae fringilla lacinia, ante mi luctus odio, id mollis diam sapien non mauris. Fusce fermentum vulputate nibh.</p>
As you can see, I have a style that centers the image or heading, one that closes the distance between two lines (tightenTop) and one that increases the margins on both side of the main text paragraphs. (indentDbl)
I use these over and over, sometimes together, to lay out my page; the stylesheet can be very short that way.
But I think I am now understanding that it would be better to have a longer, more detailed stylesheet, even though some styles would be virtually the same. For example, a class p.artFeatured that would center the featured picture; a class h3.artTitle that centers the title of the featured picture, etc. Both of those styles would be text-align:center;
Is that correct? Pardon if this seems a silly question but I want to be sure I am getting the right idea so that I can change the stylesheets if I am going about it the wrong way...
Thanks for all the helpful tips this forum provides.
lorie
My site has a section where artwork by certain artists is featured. Currently, a typical page would look like this (between appropriate DOCTYPE, <html></html> etc block, of course):
<h1>Artist Name</h1>
<p class="pic1"> </p><!-- "pic1" is an image used as a decorative divider -->
<p class="alignCenter"><img src="pix/featuredWork.jpg" width="700" height="879" alt="" /></p>
<h3 class="alignCenter">“The Featured Work”</h3>
<p class="tightenTop alignCenter">(1832)</p>
<p class="indentDbl">Some information about the featured artwork or the person portrayed.</p>
<p class="indentDbl">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus elit tellus, auctor in, aliquet ac, faucibus ut, ante.</p>
<p class="indentDbl">Mauris bibendum dignissim odio. Donec ullamcorper, quam vitae fringilla lacinia, ante mi luctus odio, id mollis diam sapien non mauris. Fusce fermentum vulputate nibh.</p>
As you can see, I have a style that centers the image or heading, one that closes the distance between two lines (tightenTop) and one that increases the margins on both side of the main text paragraphs. (indentDbl)
I use these over and over, sometimes together, to lay out my page; the stylesheet can be very short that way.
But I think I am now understanding that it would be better to have a longer, more detailed stylesheet, even though some styles would be virtually the same. For example, a class p.artFeatured that would center the featured picture; a class h3.artTitle that centers the title of the featured picture, etc. Both of those styles would be text-align:center;
Is that correct? Pardon if this seems a silly question but I want to be sure I am getting the right idea so that I can change the stylesheets if I am going about it the wrong way...
Thanks for all the helpful tips this forum provides.
lorie