![]() |
Easy Information For you | |
|
|
How to Build a Basic CSS Layout
Designing without tables by using CSS layouts is fastbecoming the new standard on the Web because of thebenefits mentioned in my previous article. Web browsersused these days are now able to render web pagesproficiently. In this article I will endeavor to create abasic 2 column CSS layout which you can use for futuredesign projects. Web Page: http://www.isitebuild.com/css/css-layout.htmlStyle Sheet: http://www.isitebuild.com/css/stylesheet.htm 1. Divide your page into sections - the div id tagsallows you to create distinct divisions on your web page.They are identified with a unique id. You can then add astyle (css selector) that specifically applies to the divof that id. Remember to include the DOCTYPE (to render yourpage accurately in the browsers) and meta tags (enablessearch engines to spider your pages). wrapper: is the div that wraps around all the other divslike a container for the page elements.header: defines the top banner of the pagemain: defines the main content of the pagenav: defines the navigation of the pagefooter: defines the footer and sub-navigation of the page 2. Create the CSS code - the CSS code styles the page as a centered 2 column CSS layout with a navigation bar and a footer. The div#wrapper style creates the centered box which acts as a container for the rest of the page content. The width: 80% rule sets the width of the div. The background-color:#FFFFFF rule creates a white background for the div. The margin-top: 50px andmargin-bottom: 50px rules create a space of 50 pixels forthe top and bottom margins for the div itself. The proper way to center a block-level element with CSS isto set margin-left: auto and margin-right: auto. Thisinstructs the browser to automatically calculate equalmargins for both sides, thus centering the div. The border:thin solid #000000 rule adds a border around the outer div.The rest of the CSS code styles the divs for the header,footer, nav, and main content. The div#header and div#footer styles set margins andpadding for those divs. In addition, div#header includesthe text-align: center rule to center the header text, anddiv#footer includes the border-top: thin solid #000000 ruleto create a border along the top edge of the div to replacethe horizontal rule above the footer in the table-basedlayout. The div#nav and div#main styles create the two columns inthe middle of the centered box. In the div#nav style, thefloat: left rule pushes the div to the left side of itsparent element (the wrapper div), and the width: 25% rulesets the div's width to 25 percent of the parent element.With the nav div floated to the left and limited to a setwidth, it leaves room for the main div to move up to theright of the nav div, thus creating the two-column effect.The div#main style includes the margin-left: 30% rule tokeep the main text aligned in a neat column instead ofspreading out below the nav column. The main div's leftmargin is set to a value slightly larger than the width ofthe nav div. Style Sheethttp://www.isitebuild.com/css/stylesheet.htm If links are placed elsewhere on the page they will inheritthe same properties as above..a blue link that hovers tored. What if you wish to create another set of links thatare a different color and on passing your mouse over themthey are underlined. 4. Create the bottom navigation - to include this in the section of the page, I use div#footer andcode each link accordingly. To make the list gohorizontally I use: display: inline; Now that I have finished creating my style sheet I want toshorten the code on page by linking it to my external stylesheet. Here's how: 4. Create an external style sheet - copy and paste all thecss code (without these tags: ) into notepad and label it something like"style sheet". Place this style sheet between the head tagsof your web page. This will reduce the code on your page so it will load fastplus the search engines can more easily spider your webpage. 4. Add content to your page - after you have got your pagelooking correctly, you can add more content to it.Adjustments can easily be made to any style on the page (oryour whole site) by simply editing one style sheet. 5. Upload your files - be sure to upload your web pages andstyle sheet to the root directory of your server. 6. Validate your code - be sure to validate your xhtmlcode: http://validator.w3.org/ and css code:http://jigsaw.w3.org/css-validator/ and make correctionswhere necessary. 7. Check browser compatibility and screen resolution -check that your page renders well in the popular browsers(IE6, NN7, Firefox) If you are beginning with CSS layouts, implement thenslowly by making small changes to your pages i.e. creatinga style sheet for your main headers and fonts only. As youbecome more familiar with CSS you may eventually build allyour future sites with CSS layouts. Resources: Basic CSS layout CSS Style Sheet Benefits of CSS Herman Drost is the Certified Internet Webmaster (CIW)owner and author of http://www.iSiteBuild.com AffordableWeb Site Design and Web Hosting. Subscribe to his "Marketing Tips" newsletter for more original articles.mailto:subscribe@isitebuild.com. You can read more of his in-depth articles at: http://www.isitebuild.com/articles
MORE RESOURCES: » |
RELATED ARTICLES
Programming Language Migration Path While I was preparing some personal background information for a potential client, I was reviewing all the programming languages that I have had experience with. I list languages that I'm most experienced with on my resume. Microsoft Great Plains Implementation in Russia - Overview for Consultant Microsoft Business Solutions Great Plains is very popular ERP platform in the USA, Canada (including French speaking Quebec/Montreal), U.K. Microsoft Great Plains Subcontracting - Overview for Microsoft Business Solutions Partner Microsoft Business Solutions Great Plains is very popular ERP/MRP applications in the USA, Canada, UK, Australia, New Zealand, Middle East, South Africa, Latin America. Considering high number of new Microsoft Great Plains partners and the desire to subcontract occasional customization, integration and reporting projects, we would like to advise you on Microsoft Great Plains subcontracting guidelines, based on our experience in dealing with Great Plains VARsCandidates for subcontracting:? Great Plains Dexterity customizations - Dexterity was and still is the IDE and programming language of Great Plains, especially workstation thick interface. Linux Dual Boot-How To Format Just the thought of a duel-boot scares many people away, but over the years it's developed into an easier process. Most people are running Windows, so I'm assuming it's your choice of preference:1. Windows x: Basic Windows "Security" Issues Language development computer:Computer-based method for aiding language development seems like an interesting idea, the trick with this would be in getting the computer to take on part of the role of the human in the checking process.In all computer aided learning applications aimed at the very young, there is a danger that the computer may be seen as a replacement for a human instructor, however computer are notorious for not volunteering information or inability to deal with erratic behaviour. Dreamweaver vs FrontPage There are two major WYSIWYG(What You See Is What You Get) editors available for beginners. These are: Microsoft FrontPage and Macromedia Dreamweaver. Free Microsoft Word Online Training Tutorial Resources Microsoft Word is one of the most popular office applications that provide many features such as word processing, web publishing and database creation. Tapping into these Word resources, however, is not always easy and straightforward, leaving users stumped and puzzled. Information Products: A Business Owners Best Friend We live in a post-industrial age where information is the coin of the realm. Knowledge is the most valuable asset that a business owns. New Web-Based HR Tool is Max From NAS, Hannibal, and InfoLink Three highly respected names in Human Resources have joined forces to provide companies with a revolutionary blend of services that make the hiring process more efficient and effective. The partnership joins three companies: NAS Recruitment Communications, a recognized leader in the specialized field of human resource communications, Hannibal, Inc. How Do I Get Rid Of That Darn Spyware? Ad-Aware and Spybot are probably the two most well known antispyware solutions. However, they frequently fail to catch the more crafty spyware. Do You Want Your Own Fully Programmable ERP? - Part 1 We are in a transition phase in the Managerial Administration models of any company or Government, because three factors are summing for that:The new powerful business Information Technologies and its more and more smaller costs, like ERP, CRM, BI, etc.,The creativity of the new MBA to generate value and its corresponding engineering - for example, Feedback Control System - in the administrative and managerial fields,Several different layers in the companies in what refers to its managerial and administrative automation levels. Microsoft and Webmasters Does Microsoft care for WebmastersIt's always been a problem with websites appearing exactly the same on different platforms. As a web developer / webmaster it is extremely difficult to make user experiences rich by having the site look the same in any OS / Browser. Cisco Certification: Introduction To ISDN, Part III Configuring PPP PAP AuthenticationNow we know how the ISDN link comes up (interesting traffic), and some scenarios that might cause the link to stay up, we need to look at ISDN authentication schemes. The two methods Cisco certification candidates must be familiar with are PAP and CHAP. 5 Easy File Management Tips in Microsoft Word How many steps does it take you to locate and open your Word documents? Try these tricks to streamline how you find and open the files you use most often:Opening DocumentsWith a variety of choices, how do you open a file? Here are the standards plus several keyboard shortcuts:? File > Open? Open toolbar button (usually 2nd from the left on the Standard toolbar)? [Ctrl] + O? [Ctrl] + F12? [Ctrl] + [Alt] + F2Selecting More Than One FileOnce you are in the Open dialog box, select more than one file to open:? To select nonadjacent files in the Open dialog box, click one file, and then hold down [Ctrl] and click each additional file.? To select adjacent files in the Open dialog box, click the first file in the sequence, and then hold down [Shift] and click the last file. Does your Company have Documentum? Are you lost in the mess of documents that get passed around your company, never knowing what the latest version is and which one you should work on without worrying if someone else has already made the same editions that you are making? Perhaps you have heard of collaboration software solutions such as Documentum to help your company manage its documents that are passed around. Documentum is a very good solution to this problem but is it the only one? In this article you will be presented with some basic information about the differences in collaboration software from Documentum and NextPage. Secure File Transfer Using SSH Plus Additional Audit & Automation - FSA Reporting In order to meet regulatory and corporate compliance requirements reporting members will require a cost effective solution that may be installed at one side of the data transfer without being tied to any proprietary protocol.Considerations include:- is it designed for use in most enterprise environments?- is it flexible & adaptable to suit an unlimited range of needs for secure file transfer internally and externally? Functionality and benefits should include:+ can easily be adapted+ Automatic transfer to single or multiple destinations of any file. Microsoft Business Solutions Partner - How to Launch New IT Consulting Practice In the new era of internet marketing the problem of severe competition comes into the first position. If you look back into 1990-th you will find high tech companies using traditional sales techniques: purchasing local and regional businesses contact lists, making cold calls and then trying hard sales closing techniques, such as "selling to the top" - IBM style, selling to VITO (very important top officer), etc. Microsoft Great Plains SOP: Sales Order Processing Microsoft Business Solutions Great Plains is marketed for mid-size companies as well as Navision (which has very good positions in Europe and emerging markets where it can be easily localized).Great Plains Sales Order Processing (SOP) module forms a third of the core Inventory and Order Processing part of Great Plains. Microsoft Great Plains: Manufacturing or Bill of Materials - Overview for IT Specialist Microsoft Great Plains is main Microsoft Business Solutions product, targeted to mid-size companies. Currently Microsoft is in progress of transforming several ERP products it has: Microsoft Great Plains, Solomon and Navision into several business suites - Microsoft Financial, Microsoft HR, Microsoft Manufacturing, Microsoft Logistics. Microsoft Great Plains Jewelry - Implementation & Customization Overview Each Industry and market niche has business specific and unique requirements to ERP/Accounting System. Microsoft Business Solutions Great Plains is ERP platform, ready for third party modules additions and customizations, plus being SQL Server-based system it opens you wide spectrum of integration options and tools. |
|
home | site map | Free Forum Host | Forums |
| © 2007 - 2008 |