CSS

Page 1

Fixed widths and float – A CSS Layout Rachel Andrew

Fixed widths and float – A CSS Layout At this point in time, if you have a brand new site to design, you should be considering up to date methods and techniques in order to design and create your site. Otherwise, your site might look out of date as soon as it is launched. This tutorial will take you through the process of building a modern page design using CSS for layout and bearing in mind best practice in terms of document structure. The layout that we will be building demonstrates two useful techniques in terms of CSS layouts. We are going to design a page with a fixed width, centered layout and we will also be using the float property within this layout – so if you have been wondering how to do a fixed width layout or how float can be used for CSS positioning then this tutorial will hopefully answer some of your questions! As this is quite a complex tutorial and we skip through some of the things quite quickly that are covered in other tutorials I have included the CSS and XHTML files in the code download, so you can compare your results with mine or use mine as a starting point for experimenting with this layout.

The Site The fictional company for whom I'm designing the site is "Veg 2 U", an organic produce delivery company. They want a site that allows their customers to create their orders online for home delivery. The homepage should include a navigation menu that lists the different categories of products available and a menu to the main pages of the site, some brief information about the company for new visitors and a login form for current customers to log into their account and update their orders. There should also be some brief information on how to use the site and also place for special offers to appear. The site needs to look attractive and welcoming, be easy to use and search engine friendly as the company hope to get customers through people finding them when searching for organic products.

Marking-up the content I'm going to start with the site content instead of the design, while I have some idea of the design that I want to create, with CSS I can play around with that all I like, however getting the structure of the content right first means that I have a strong position from which to start, and also means that I am less tempted to plan my content structure around my design, possibly leading to the site becoming less accessible. In Dreamweaver I create a new, XHTML compliant document. I know that on the homepage I am going to have: • • • • • •

A login form for username and password Introductory content How to use this site Navigation menu Category listings of available products Special Offers

I need to decide the order in the document that this content is displayed – this will be important for people using text only devices such as screen readers. As many of our visitors are likely to be return visitors who will want to be able to quickly login and make up their order I'm going to start with the login form so that a user of a text only device can immediately login.

Copyright © 2004 DNzone.com All Rights Reserved to get more go to DNzone.com

Page 1 of 13


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.