div sections

Events happening in the community are now at Drupal community events on www.drupal.org.
tzvio's picture

Hi, what is the meaning of the sections div's that appear in page.tpl.php and how should i use them?

Comments

div sections

creativitea's picture

I believe they help clear floated elements? I have used them in the past for positioning tweaks in my themes.

Should i use them?

tzvio's picture

is it recommended to keep the sections and build the inner divs inside them?

I believe it's just a means

jerseycheese's picture

I believe it's just a means of logically organizing the "sections" of your page into bigger pieces and giving you safe place to add padding/margins to areas of your page. All padding and margins should, I think, be done to the .sections rather than their parent divs, such as #header and #footer, to avoid issues that may arise from any layout/positioning CSS you have in your layout.css file for those divs.

In recent updates to the theme, these .section divs have replaced the old #whatever-inner divs. #whatever-inner made less sense from a naming standpoint, semantically, than .section does.

thanks!

tzvio's picture

thanks!

Thanks Jersey

KennyVanLent's picture

Will add padding and margins only to .section from now on.