Sunday, June 28, 2009

Saving Time with CSS Inheritance

Inheritance takes many forms. We inherit sutff, we inherit traits from out parents, grandparents and beyond and then there is the CSS inheritance. Bascially, the CSS properties applied to one tag are passed on to nested tags. For example a (p) tag is always placed inside a (body), so the properties of the (body) get inherited by the (p) tag. You can use inheritance to streamline some of your style sheets. For instance if you want all of the text on one page to use the same font. Rather than create styles for each of the tags, simply create a tag style for the (body) tag. In the style indicate which font you want and all the tags on that page will inherit the font,for example body {font: Arial, Helvetica, sans-serif}. You can also use inheritance to apply styles to certain sections of the page using the (div) tag. Using the (div) you apply styles for only those tags inside the (div) tag. So if you want all of the text on the banner to be bold; 2em, arial, then create a (div) tag in the header section specific for the banner, ie., (div id ="banner"), then in the style sheet put #banner: {font: 2em Arial; font-weight: bold}. Using CSS is the only way to style sheets now but you already knew that. Article id: 9/1,13/19,15/8,1,16,16,25/25,15,21/1,18,5/9,14/13,25/12,9,6,5)

Saturday, June 20, 2009

What Does Cascade Mean in CSS

Although there are some hold outs, Cascading Style Sheets are pretty much the norm for styling web pages. But how many people actually use the Cascade portion of Cascading Style Sheets. Its something to be famiiar with as it can be a friend or a foe. It all has to do with hierarchy. Lets say for some reason you have to overrule some of the external style sheets for just one page. What you would do is use the embedded CSS for that page. It will override any rules you have for that page on your external style sheet. So if you want h2 to be red, then put it in the page as embedded. An embedded rule overrules an external rule for an element. So if your external sheets says font-size: 2em, color: red; and you embed color:green then the text will turn to green but the font-size wil remain at 2em. Take it one more step what if you want to overrule the embedded style. Then you would use an inline style such as h2 style="color: blue". Now the text overruled the embedded and the external rule for color, but the text remained at 2em. In conclusion, the rules are inline first, embedded second, external third.

Monday, June 8, 2009

Building a Web Page the Right Way

Without going into the details of code there is a right way to build a web page and a wrong way. In the past web developers took HTML, CSS and Javascript and dumped it all on a page called it the index.html and they were done. That is not the case any longer. To create it the right way you should have one page for content (XHTML), one page for style (CSS) and one page for behavior (Javascript). Then link those pages together. This way if you need to make a style change you only have to change one area, the code on the CSS page and that's it. So if you have 10, 50 or 100 pages this comes in quite handy. For example lets say you want change all of your navigation links to different color. The old way you would have to go through each page and change each link indiviudally. With CSS on a separate page you would first put your navigation in a

Tuesday, June 2, 2009

Search Engine Optimization (SEO)

Ok so you got your website done and its beautiful. You are ready to FTP to your hosting service are you really ready? Well how about the part where you submit it but no one ever sees it because it ranks 4,777,767,000 on the website page ranking. Since Google show about 10 sites per page then your audience will have to click about 4billion times before it gets to your site. That's where Search Engine Optimization comes in. A service I have studied by one of the world's greatest authors on the subject Mr. Bob Viers. Using a combination of keywords spread out throughout your web site and a little insight into Google Analytics, Googlebot, Search Engine Share Ranking (SERP) and some Google Web Master tools. I can bring your web page from the cold, damp tundra of never never land to front page on Google. I concentrate on Google because Google has over a search engine share of 60% and no one else is even close. Yahoo has 16.8%, Live Search has 9.8%, AOL Search is 4.1% and Ask is 2%. hold on all people who do searches on the web. Bottom line is 60% of all searches are done in Google. So anyone out there interested in bringing there web site ranking to the forefront feel free to email me at my business address above.