The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Headings and Sections

I am working on a site which is a single page. Its a tattoo shop's page. There isn't much content so a single page works.

There are various sections in the page, 5 in total with small bits of text. Now each section is headed with a H2 which encloses the sections title.

Usually I do this:

Code:

<div id="some-section">
<h2>Section Name</h2>
blah blah ...
</div>

But, I have had to include the heading outside the <div> now because of a style issue.

Basically each section needs to have 50px padding on the left and right. The heading has an underline which spans 100% of the page width. If I apply the padding with the H2 inside the section the H2 also gets the padding because the padding is applied to the section div and not individual elements.

Sorry if I am boggling the brain, lol.

Anyway, just wondering if what I am doing is wrong. It seems like the quickest method to me with only the need for 1 declaration rather than applying padding to individual elements within all the sections.