100 likes | 213 Vues
This guide provides essential tips for creating effective layouts using HTML5 and CSS in electronic writing environments. It covers the significance of semantic elements, the CSS box model, and specific layout properties like margin, border, padding, width, and height. The steps to creating a layout include wireframing, building structure with <div> elements, and populating these structures with content. Emphasizing the importance of organization and visibility, this guide enhances your understanding of how to control the position and size of objects, ensuring an optimized user experience.
E N D
WRT235: Writing in Electronic Environments General Layout Tips
Agenda • Discuss Layouts • HTML5 Semantic Elements • HTML5 for Layouts • CSS Layouts
Review • CSS Box Model • margin, border, padding, width, height properties • Controls position and size of objects • Can be controlled by CSS
Steps to Creating a Layout • Wireframe • Build structure with <div> objects • Populate structures with content • Use CSS to position <div> objects
Steps 2: Build Structure with <div> • Remember: all <div> objects have ids • Meaning that your CSS will have these ids • Browsers read from top to bottom so arrange your <div> objects accordingly • Indent to show hierarchical relationships • Use comments when closing <div> to keep track <div id=“header”> stuff </div><!-- close #header -->
Steps 3: Create Content • General: • Assign a width value to container object, center it • Assign a width value to navigation, float left • Position content to sit next to navigation • Make sure margins work – everything is a box
Steps 4: Arrange with CSS • <div id=“header”> • A header and subheader (e.g., <h1> and <h3>) • <div id=“navigation”> • A list with 4 items • <div id=“content”> • Subheader and 3 paragraphs (you can use lorenipsum text_ • <div id=“footer”> • A paragraph with footer information
960 Grid System • http://960.gs/ • http://960.gs/demo.html • Sketch sheets on Sakai
Why Grids? • Allows for symmetrical organization of content • Adapts to most screens • Makes the math easy