<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dreamweaver, Flash, Photoshop, CSS, Fireworks and HTML Tips &#38; Tricks &#187; CSS Tips and Tricks</title>
	<atom:link href="http://www.livetrainingsession.com/tips/category/css-tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.livetrainingsession.com/tips</link>
	<description>Get Quick Tips &#38; Tricks on Web Applications Development Tools</description>
	<lastBuildDate>Thu, 29 Jul 2010 21:16:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Is Your Web Page Jumping Left and Right?</title>
		<link>http://www.livetrainingsession.com/tips/2010/05/web-page-jumping-left-and-right/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/05/web-page-jumping-left-and-right/#comments</comments>
		<pubDate>Fri, 21 May 2010 03:00:34 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[HTML Tips]]></category>
		<category><![CDATA[bar]]></category>
		<category><![CDATA[centered]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[horizontal]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[min-height]]></category>
		<category><![CDATA[scroll]]></category>
		<category><![CDATA[scrollbars]]></category>
		<category><![CDATA[scrolling]]></category>
		<category><![CDATA[width]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=367</guid>
		<description><![CDATA[I work very often with digital artists and other creative people who are now investing their talents designing web sites. I am always eager and pleased to offer my expertise in web development to help those clients of mine convert a masterpiece  crafted in  Photoshop, Illustrator or Fireworks into  full-blown web templates ready for text [...]]]></description>
			<content:encoded><![CDATA[<p>I work very often with digital artists and other creative people who are now investing their talents designing web sites. I am always eager and pleased to offer my expertise in web development to help those clients of mine convert a masterpiece  crafted in  Photoshop, Illustrator or Fireworks into  full-blown web templates ready for text copy.</p>
<p><span id="more-367"></span></p>
<p>Very often after I am done doing my part and transfered all the  web files  to the client , I receive an email/ phone call a day or so later inquiring why  some pages jump in web browser.</p>
<p>The very first thing the client blames is the current web browser s/he is using, and why not? Then after opening all the major web browsers at his disposition he realizes the issue remains the same on all browsers.</p>
<p><strong>Now, may be I am the one who screwed up!</strong><br />
<strong><span style="color: #ff6600;"> Nope!!</span></strong></p>
<p>In all cases it&#8217;s because web pages have different amount of content some longer than others. When a web page is long enough to exceed the web browser&#8217;s height  then a vertical scroll bar appears.  If on the other hand the web page only has a small amount of copy, everything is shown above the fold and no vertical scroll bar is needed by the web browser.</p>
<p><strong><span style="color: #ff6600;">Cause :</span></strong><br />
When using a <strong>fixed width layout</strong> with <strong>the left and right margins set to auto</strong> on your main container (#wrapper) , your web pages will be <strong>horizontally centered</strong>. The horizontal position of your web page depends on  the available width in your web browser viewport.</p>
<p>Let&#8217;s assume your browser window is 1024 pixels wide and that you have set your page layout to a fixed width of 980 pixels to be horizontally centered.</p>
<ul>
<li> If a page copy is concise  the entire page can be shorter than your browser window&#8217;s height. In this case no vertical scroll bar is necessary. You web page will therefore have a left and right margin of roughly (1024-980)/2, that is about 22 pixels on each side.</li>
<li> Now left assume another web page has a lot of text copy. In this case the page height to exceeds the web browser&#8217;s window height. A vertical scrollbar appears therefore cutting down on the width of the browser&#8217;s viewport.<br />
<strong>The width of the scrollbar is about 20 pixels</strong>, so we are now left with only 1004 px (pixels).</p>
<p>Using the same formulas as above (1004-980)/2, yields 12 pixels for the left and right margin for this web page. That&#8217;s what creates a <strong>10px horizontal shift</strong> to the left when you navigate from short (no vertical scrollbar) to a longer page where the vertical scrollbar is required.</li>
</ul>
<p><strong><span style="color: #ff6600;">Solution:</span></strong><br />
To solve the issue we are facing the solution is to force the web browser to display the vertical scrollbar on every page no matter how much content there is in there.</p>
<ol>
<li>- <strong>Option 1<br />
</strong>Using the &#8216;<em>min-height</em>&#8221; CSS property to  set a minimum height of your main container to match that maximum browser window height of your target audience.</p>
<p>The problem is you do not yet  have that information yet you review your web analytics after your site went live.</p>
<p>However from a personal experience, I found that setting the min-height to <strong>1000px</strong> will generally do the trick. The only hiccup is the  &#8221;<strong>min-height</strong>&#8221; CSS property is not understood by IE6. Therefore users using that version of  Internet Explorer will experience the horizontal page  shift.</li>
<li><strong>- Option 2<br />
</strong>Add a just  enough line breaks (Shift+Enter) or empty paragraphs (Enter) after the content on pages with less copy.</li>
</ol>
<p>Choose whichever option is more suitable to your  design and target audience.<br />
I&#8217;ll go for option 2 for the time being until IE6 disappears from the web landscape.</p>
<p>Does it really matter if a web page shift just a few pixels. For most people, it doesn&#8217;t. heck, most site visitors will even notice or be bothered by it.</p>
<p>But it&#8217;s a great deal for digital artists. Graphic designers are a different breed. A graphic designer will &#8220;fight you&#8221; tooth and nail for 1 pixel and for a good reason. That doesn&#8217;t mean visual artists are very difficult people to work with, on the contrary. They just thrive for perfection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/05/web-page-jumping-left-and-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Browser Lab For Cross-browser Preview</title>
		<link>http://www.livetrainingsession.com/tips/2010/04/adobe-browser-lab-for-cross-browser-preview/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/04/adobe-browser-lab-for-cross-browser-preview/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 00:10:10 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[Dreamweaver Tips]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[cross-browser]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[operating]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=298</guid>
		<description><![CDATA[Adobe just launched a new service for cross-browser and operating system viewing of web pages: Adobe Browser Lab. That&#8217;s some great news for web developers. There no longer a need to install a plethora of web browsers just to preview the new web page design. Because of discrepancy between the display of web pages in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/04/adobe_browse_lab.jpg"><img class="alignleft size-full wp-image-300" style="margin: 0 10px 10px 0;" title="adobe browser lab" src="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/04/adobe_browse_lab.jpg" alt="" width="246" height="119" /></a>Adobe just launched a new service for cross-browser and operating system viewing of web pages: <strong>Adobe Browser Lab</strong>.<br />
That&#8217;s some great news for web developers. There no longer a need to install a plethora of web browsers just to preview the new web page design.</p>
<p><span id="more-298"></span></p>
<p>Because of discrepancy between the display of web pages in different web browsers and even different operating systems, one needs to test the website on all major browsers to make sure the &#8220;web pages do not break&#8221;. The problem is if you are PC user on Windows, you need to get a hold of Mac as well and vice-versa for testing purpose.</p>
<p><a href="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/04/adobe_browser_lab_browsers.gif"><img class="alignleft size-medium wp-image-301" style="margin: 0 10px 10px 0;" title="adobe_browser_lab_browsers" src="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/04/adobe_browser_lab_browsers-219x300.gif" alt="" width="219" height="300" /></a> There are already websites out there that offer similar site preview services. Some are free, others not so much. However most of them require a waiting period of an hour or more before you get  the preview screenshots by email.</p>
<p>With the new  <strong>Adobe Browser Lab</strong> service, you can test you entire new web site on different web browsers in different operating systems for free. It&#8217;s a live service that means, you get your preview result within seconds not hours.</p>
<p>All you need is have a free adobe account to start testing your web pages in the major browsers  shown here. Just go to <a rel="nofollow" href="https://browserlab.adobe.com">https://browserlab.adobe.com</a> and take it for a spin.</p>
<p>I am not quite sure yet <strong>why the Opera web browser is not included</strong> in the list but I can bet Adobe has a good reason for that. I&#8217;ll keep you in the loop once I get more information about that.</p>
<p>What&#8217;s even more interesting with <strong>Adobe Browser Lab </strong>is its integration with the soon to be released <strong>Dreamweaver CS5</strong>.</p>
<p>Once more Adobe listened to the web design community and as always answers with some new amazing products on each new release of its products suite.<br />
I for one cannot wait to get a test drive of  the new Dreamweaver, Flash, Photoshop, Fireworks and After Effects from the <strong>CS5 Master Collection</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/04/adobe-browser-lab-for-cross-browser-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Make IE6 Play Nice with Other Web Browsers</title>
		<link>http://www.livetrainingsession.com/tips/2010/03/how-to-make-ie6-play-nice-with-other-web-browsers/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/03/how-to-make-ie6-play-nice-with-other-web-browsers/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 17:40:22 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[HTML Tips]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[conditional]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=272</guid>
		<description><![CDATA[The constant web browsers war is more about the chaos and the lack of consistency across the board in implementing the recommendations of the W3C (Worldwide Web Consortium) regarding HTML and CSS. That leaves web developers in the middle of a land mines field. Those pour souls have to gather all the courage it takes [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/03/web_browsers1.jpg"><img class="alignleft size-full wp-image-284" style="margin: 0 10px 10px 0;" title="Most Popular Web Browsers" src="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/03/web_browsers1.jpg" alt="" width="187" height="180" /></a>The constant web browsers war is more about the chaos and the lack of consistency across the board in implementing the recommendations of the W3C  (Worldwide Web Consortium) regarding HTML and CSS. That leaves web developers in the middle of a land mines field. Those pour souls have to gather all the courage  it takes to tiptoe out that mess when designing or updating web applications.</p>
<p><span id="more-272"></span></p>
<p><span id="more-272"> </span></p>
<p>It’s up to the web designer/developer to make sure the web site displays or degrades gracefully on all major web browsers: Firefox, Opera, Chrome, Safari and Internet Explorer (IE6, IE7, IE8). Reaching that goal seems daunting if not impossible.</p>
<p><span style="color: #ff6600;"><strong>How can one make all those web browsers get along?</strong></span></p>
<p>For years  now web developers have been pointing the accusatory finger to Internet Explorer: J’ACCUSE!!</p>
<p>Well, a few years back Netscape 4 was sitting on the trial bench, accused of slowing down the web. These days, all eyes are on IE6 . Internet Explorer 6 does not support most of the new HTML &amp; CSS features which take web page design to the next level: CSS round corners, PNG graphics, and the CSS :hover pseudo-selector is limited to the anchor tag.</p>
<p>Those are just a few of the potholes along a winding road. The need to make websites display well on all major browsers, despite all the shortfalls mentioned  earlier, puts a brake on how far a web designer/developer can push the envelope. More and more time is spent on a given project tweaking and “hacking the code” to be compatible with IE6 and others. And that “my friends” can not only be a real nightmare for the web designer, it’s a big impediment to the evolution of the web.</p>
<p>Since you will have to include IE6 anyway in the list a web browsers to check your website again, here are a few nuggets to save you tremendous web development time and frustration. At any stage in your web design process (HTML/CSS):</p>
<ul>
<li>Avoid applying padding to main CSS layout containers (div tags) at all cost</li>
<li>Use margins in the nested container to simulate the left and right padding on the closest parent container.</li>
<li>Wrap the text in paragraph (&lt;p&gt;) tags to which you applying margins to achieve the padding.</li>
<li>IE6 doubles the margin of the floated element on the direction of the floating  (left or right)</li>
<li>Always specify a width of any floated HTML element</li>
<li> Apply both the float and inline display properties to list items of your horizontal navigation</li>
<li>If you must hack, create a separate CSS style sheet where you would group all the styles aimed at IE6 and use the Internet Explorer’s conditional comments.</li>
</ul>
<p>At the end of the day/project, web development is all about matching the capabilities of the end-user’s web browser. It’s less about the artistic talent of the graphic artist or the programming skills of the web programmer.</p>
<p>“<em><strong>This web site is best viewed in<em><strong> web browser</strong></em> X or Y</strong></em>” is just an excuse to avoid spending extra time checking your design compatibility with other major web browsers. It might seem cost effective at first but it does not make business sense: you are loosing potential customers user web browsers different than your target browser.</p>
<p>All you need is to preview your site design at crucial steps during the web development process to fix potential problems early on. In the end you will achieve a design that will accurately display your website on all major web browsers. It may also be time to target smartphones as well.</p>
<p>IE6 is still here and breathing. We just have to deal with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/03/how-to-make-ie6-play-nice-with-other-web-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 9 to Embrace HTML 5, CSS3 and SVG</title>
		<link>http://www.livetrainingsession.com/tips/2010/03/internet-explorer-9-to-embrace-html-5-css3-and-svg/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/03/internet-explorer-9-to-embrace-html-5-css3-and-svg/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 15:00:19 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[HTML Tips]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[IE9]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=243</guid>
		<description><![CDATA[Internet Explorer (IE) is one of the most used web browsers on the internet today. Its popularity cannot certainly be attributed to its  performance. The spread of that browser on personal computers is linked to the fact that Internet Explorer is  shipped with most new PCs using the Windows Operating System. Most web users still [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/03/IE_icon.jpg"><img class="alignleft size-full wp-image-255" style="margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px;" title="Internet Explorer Web Browser" src="http://www.livetrainingsession.com/tips/wp-content/uploads/2010/03/IE_icon.jpg" alt="" width="150" height="145" /></a>Internet Explorer (IE) is one of the most used web browsers on the internet today. Its popularity cannot certainly be attributed to its  performance. The spread of that browser on personal computers is linked to the fact that Internet Explorer is  shipped with most new PCs using the Windows Operating System. Most web users still perceive IE as &#8220;the&#8221; internet browser because IE used to be tied to Windows OS until recently.</p>
<p><span id="more-243"></span></p>
<p>However because of IE&#8217;s lack of support of new CSS and HTML features, most web developers consider Internet Explorer as more than a nuisance and start recommending other &#8220;more modern&#8221; web browsersto their clients and friends:  Firefox, Safari, Opera and  &#8221;the new kid in the block&#8221;  Google Chrome.</p>
<p>IE6 is still around because it&#8217;s the default web browser for most Windows XP users. Although the percentage of IE6 users is dwindling every month,   web developers still have to optimize their web site design (HTML, CSS, Javascript) to accommodate that old web browser.</p>
<p>IE7 and the latest version IE8 are certainly a great attempt from Microsoft to be inline with the recommendations of the Worldwide Web Consortium (W3C). But there is  still more room for improvements. IE lacks some of the most important functions most modern web browsers have today.</p>
<p>But all that is going to change very soon with the upcoming of a new version,  IE 9. The rumor is IE9 will  support HTML 5,  CSS 3 and SVG vector graphics. What that means is the ability among other things to:</p>
<ul>
<li> create round corners with CSS without using graphics</li>
<li>display a multicolumn page content without manually breaking it down in separate containers</li>
<li>apply multiple background images to the</li>
</ul>
<p>Those are just a few of the new features the CSS3 specifications include. They are already supported by Firefox, Opera, Safari and Chrome.<br />
For now, let&#8217;s wait and see what surprises Internet Explorer version 9 (IE9) has in store for us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/03/internet-explorer-9-to-embrace-html-5-css3-and-svg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Design a Clean CSS Web Page Layout</title>
		<link>http://www.livetrainingsession.com/tips/2010/03/how-to-design-a-clean-css-web-page-layout/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/03/how-to-design-a-clean-css-web-page-layout/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 09:08:14 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[Dreamweaver Tips]]></category>
		<category><![CDATA[HTML Tips]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=235</guid>
		<description><![CDATA[Using CSS to convert your graphic design from Fireworks/Photoshop into a full-blown web page is an art in its own right. It takes some time to master that craft but you can achieve clean CSS layouts with a lots of practice  or quickly learn the tricks-of-the-trade from an expert. Not matter how intricate a web [...]]]></description>
			<content:encoded><![CDATA[<p>Using CSS to convert your graphic design from Fireworks/Photoshop into a full-blown web page is an art in its own right. It takes some time to master that craft but you can achieve clean CSS layouts with a lots of practice  or quickly learn the tricks-of-the-trade from an expert.</p>
<p><span id="more-235"></span></p>
<p>Not matter how intricate a web page design seems to be, you can &#8220;move it&#8221; from the graphic application to your favorite HTML editor (HTML, CSS) by following simple steps. That helps you get a clean HTML markup, well structured CSS styles and overall, an easy to maintain website.</p>
<p>Before you start working in Photoshop/Fireworks I assume you took the time to plan your design. You do some research to help you decide what design style is best suited for your new web site. Break down your website into individual pages to define o your site structure. You then create wireframes to illustrate the  your web pages&#8217; layout. Don&#8217;t just keep all that information in your head: put it in &#8220;black &amp; white&#8221; on a pad  then sketch out the layout.</p>
<p>Any important project needs planning before you roll up your sleeves and start digging and web site design is no exception. If you skip those preliminary preparation steps then you are in for a big trouble,  in other words, waste of time and poor  results.</p>
<p>When converting a graphic design into a CSS layout:</p>
<ol style="color: #ff6600; font-weight: bold;">
<li>Look at the big picture. The primary goal is to have one CSS layout template for your entire website</li>
<li>Look at your design in terms of wireframes to isolate the main layout blocks/rectangles</li>
<li> Once you have those main containers, preview your design in all major web browsers</li>
<li>Repeat step 2 and 3 when adding content to each main block.</li>
</ol>
<p>When followed properly those 4 steps will help you:</p>
<ul>
<li> quickly achieve your CSS layout</li>
<li>avoid unnecessary nested of HTML tags</li>
<li>keep your HTML markup clean and easy to update</li>
</ul>
<p>Just knowing CSS properties, learning how to create CSS styles is not enough to design well-crafted CSS layout.<br />
Learn more about our <a href=" http://www.livetrainingsession.com/training/css.html">Online CSS Training</a> to get all the tips and tricks-of-the-trade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/03/how-to-design-a-clean-css-web-page-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use HTML Comments To Solve CSS Layout Issues</title>
		<link>http://www.livetrainingsession.com/tips/2010/02/use-html-comments-to-solve-css-layout-issues/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/02/use-html-comments-to-solve-css-layout-issues/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:00:29 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[Dreamweaver Tips]]></category>
		<category><![CDATA[HTML Tips]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[container]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[nest]]></category>
		<category><![CDATA[nested]]></category>
		<category><![CDATA[nesting]]></category>
		<category><![CDATA[wrapper]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=86</guid>
		<description><![CDATA[If you are not inclined to use HTML comments in your web page markup you certainly never spent hours trying to fix a messed up CSS layout. That&#8217;s a loss of productivity and money that could have been avoided with just a simple preventive measure: using HTML comments.  It takes less than 20 seconds to [...]]]></description>
			<content:encoded><![CDATA[<p>If you are not inclined to use HTML comments in your web page markup you certainly never spent hours trying to fix a messed up CSS layout. That&#8217;s a loss of productivity and money that could have been avoided with just a simple preventive measure: <strong>using HTML comments.  <span style="font-weight: normal;">It takes less than 20 seconds to write one that could save you an hour of layout troubleshooting.</span></strong></p>
<p><span id="more-86"></span></p>
<p><strong><span style="font-weight: normal;">You just devoted  hours creating a pixel-precision CSS layout,  tweaked and tested it on various web browsers. It all looks good and works perfectly even in IE6.  You now have a  template you can use to create your web pages.  You start adding content, preview  that web page in a browser and surprise, oh surprise, your nicely crafted layout is now out of control.</span></strong></p>
<p><strong>What happened?</strong> <span style="background-color: #ffff00;"> </span><strong><span style="background-color: #ffff00;">More likely mismatched &lt;div&gt;, &lt;p&gt; or &lt;span&gt;,&#8230; tags!!</span></strong></p>
<p>Without proper comments to indicate where each main container tag is closed in the HTML markup, it can be challenging and painful to &#8220;hunt&#8221; the source of this layout issue. Because you now have so many nested  tags, you would have to look into your HTML markup line by line to match each opening and closing tag. And if you happen to miss just one of them, you will have to start all over again from the &#8220;&lt;body&gt;&#8221; tag down.</p>
<p>Let&#8217;s just take a look at this typical  markup within a body of an HTML document:</p>
<p><em><span style="color: #333333;">&lt;div id=&#8221;wrapper&#8221;&gt;</span><span style="font-style: normal;"><em><span style="color: #333333;">&lt;div id=&#8221;header&#8221;&gt;Header content goes here &lt;/div&gt;&lt;div id=&#8221;maincontent&#8221;&gt;&lt;div id=&#8221;content&#8221;&gt; Page content goes here&lt;/div&gt;&lt;div id=&#8221;sidebar&#8221;&gt; Sidebar Navigation&lt;/div&gt;&lt;/div&gt;&lt;div id=&#8221;footer&#8221;&gt; Footer Content goes here&lt;/div&gt;&lt;/div&gt; </span></em></span></em></p>
<p>It looks clean and is self-explanatory. However once you start  to copy &amp; paste content in the different containers  and add new blocks , matching tags becomes a daunting task. That&#8217;s because each container can wrap smaller containers through a nesting process that can go on and on. It&#8217;s hard to tell which closing &#8220;&lt;/div&gt;&#8221; corresponds to which opening &#8220;&lt;div &#8230;&gt;&#8221;.</p>
<p>That&#8217;s why you need to always comments your HTML markup before you start adding content. For instance the markup shown above would be properly commented as follow:</p>
<p><em><span style="color: #333333;">&lt;div id=&#8221;wrapper&#8221;&gt;<br />
</span><em><span style="color: #333333;">&lt;div id=&#8221;header&#8221;&gt;Header content goes here &lt;/div&gt;&lt;!&#8211;  end header &#8211;&gt;<br />
&lt;div id=&#8221;maincontent&#8221;&gt;<br />
&lt;div id=&#8221;content&#8221;&gt; Page content goes here&lt;/div&gt;&lt;!&#8211;  end content &#8211;&gt;<br />
&lt;div id=&#8221;sidebar&#8221;&gt; Sidebar Navigation&lt;/div&gt;&lt;!&#8211; end sidebar &#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211; end maincontent &#8211;&gt;<br />
&lt;div id=&#8221;footer&#8221;&gt; Footer Content goes here&lt;/div&gt;&lt;!&#8211; end footer &#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211; end wrapper &#8211;&gt;</span></em></em></p>
<p>The portions &#8220;&lt;!&#8211; &#8230; &#8211;&gt;&#8221; are HTML comments. The will never be displayed by a web browser when placed in your HTML markup.<br />
So the tips I would like to share with you based on my daily experience are:</p>
<ul>
<li> Comments helps you annotate your markup for future reference.</li>
<li>Add an HTML comment right after the closing tag &#8220;&lt;/div&gt;&#8221; tag of each main container.</li>
<li>Commenting your HTML code  help you set reference point where each HTML tags is closed.</li>
<li>HTML comments  helps you  isolate  each block and quickly fix a CSS  layout issue.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/02/use-html-comments-to-solve-css-layout-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Body Background Color and Background Image</title>
		<link>http://www.livetrainingsession.com/tips/2010/01/css-body-background-color-and-background-image/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/01/css-body-background-color-and-background-image/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 19:19:01 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[HTML Tips]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[image]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=47</guid>
		<description><![CDATA[This post shows you how to use the HTML body tag to add a background color that covers the entire browser's viewport and create a contrast between your web page and the remainder of the screen. You will also learn to add a background image to the body tag to create more visual effects.]]></description>
			<content:encoded><![CDATA[<p>You certainly know the HTML &#8221;<em><strong>&lt;body&gt;</strong></em>&#8221; tag is the topmost container box that wraps your web page design elements and content. Of course we can all agree that the <em>&#8220;</em><strong><em>&lt;html&gt;</em></strong><em>&#8221; tag is the topmost parent element of the HTML DOM</em>.  So let me reformulate my previous statement to satisfy the geek within you:<em> the body is the closest parent to HTML elements in  your web page content</em>. You can use the body tag to change your web page background color from the default &#8220;white&#8221;.</p>
<p><span id="more-47"></span></p>
<p>To add a background color that covers the entire web browser&#8217;s viewport,  set a background  property to the HTML body tag:<br />
<span style="font-style: italic; font-weight: bold; color: #ea9d14;"> body {<br />
background-color: #333333 ;<br />
}<br />
<span style="color: #000000; font-style: normal; font-weight: normal;">That create dark grey background color (#333333).</span></span><br />
Applying a background color to the body tag  add more contrast between  your web page content and the remainder of the screen particularly with fixed width CSS layouts.  In general, using a CSS background color is the easiest way to &#8220;colorize&#8221; a given block of content without adding much to your web page download time.</p>
<p>You can also add a background image to your web page body using the CSS style.<br />
<span style="font-style: italic; font-weight: bold; color: #ea9d14;">body {<br />
background-image: url(images/bgbody.gif) ;<br />
}</span><br />
The <em>url</em> parameter defines the relative path to the graphic used as a background image.<br />
That file&#8217;s path can be absolute (i.e. <em>http://livetrainingsession.com/images/bgbody.gi</em>f  or <em>/images/bgbody.gif</em>) or <em><strong>relative to the location the CSS style</strong></em> as show above.<br />
Feel free to copy and paste that absolute path nto your web browser&#8217;s address bar to see the actual background image.</p>
<p>In this instance the web page uses a very small graphic made of dark-grey patterns. You can see that tiling bleeding through the left and right edges of this web page if your display width is greater than 980 pixels.</p>
<p>You can  simultaneously apply the background color and the background image to the body tag as well. You would write the CSS style as follow:<br />
<span style="font-style: italic; font-weight: bold; color: #ea9d14;"> body {<br />
background-color: #333333 ;<br />
background-image: url(images/bgbody.gif) ;<br />
}</span></p>
<p>or use a more compact,  shorthand version:<br />
<span style="font-style: italic; font-weight: bold; color: #ea9d14;">body {<br />
background: #333333  url(images/bgbody.gif) ;<br />
}<br />
</span><br />
<span style="font-style: normal;">or even more compact:<span style="font-style: italic; font-weight: bold; color: #ea9d14;"><br />
body {<br />
background: #333  url(images/bgbody.gif) ;<br />
}</span></span></p>
<p><em><span style="font-style: normal;">In this example, the background color is written in its compact form (#333). An hexadecimal value  made of three pairs of identical values (33) can be replaced by just three values (333), one for each pair. Hence &#8220;#999999&#8243; could be replace by &#8220;#999&#8243; and the color &#8220;#FFFFFF&#8221; can be written &#8220;#FFF&#8221;.</span></em></p>
<p><em><span style="font-style: normal;"><br />
It&#8217;s always a good idea to use a background color in conjunction with a background image. The web browser covers the &#8220;viewport&#8221; with the background color while downloading the background graphic. It&#8217;s not only for aesthetic but to avoid the visitor having to stare an empty white screen while the web page is loading.</span></em></p>
<p><em> </em></p>
<p><em><strong><em>It&#8217;s worth mentioning the background image is always displayed on top of the background color whenever the two are applied to the same HTML element. And it does not matter in which order they are defined.</em></strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/01/css-body-background-color-and-background-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Background Color and Background Image</title>
		<link>http://www.livetrainingsession.com/tips/2010/01/css-background-color-and-background-image/</link>
		<comments>http://www.livetrainingsession.com/tips/2010/01/css-background-color-and-background-image/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 21:50:45 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tips and Tricks]]></category>
		<category><![CDATA[Dreamweaver Tips]]></category>
		<category><![CDATA[HTML Tips]]></category>

		<guid isPermaLink="false">http://www.livetrainingsession.com/tips/?p=46</guid>
		<description><![CDATA[Applying a background color to an HTML element in a web page  fills that container with the specified color. It enhances your web page visual appeal and makes the container stand out. It can also add contrast between the content of that block with its surrounding. A background image allows you to get more graphic [...]]]></description>
			<content:encoded><![CDATA[<ul style="font-weight:normal;">
<li>Applying a <strong>background color</strong> to an HTML element in a web page  fills that container with the specified color.</li>
<li>It enhances your web page visual appeal and makes the container stand out.</li>
<li>It can also add contrast between the content of that block with its surrounding.</li>
<li>A <strong>background image</strong> allows you to get more graphic design and creative effect to the HTML block it&#8217;s applied to.</li>
<li>A background image comes particularly handy for creating round corners rectangles without adding too much HTML markup.</li>
<li>Using a background image is almost unavoidable for achieving  gradient effects applied to web page  blocks such as the navigation bar.</li>
</ul>
<p><span id="more-46"></span></p>
<p>Let&#8217;s explore how to use CSS to apply a background color and a background image to any HTML element in your web page.</p>
<h3 style="color: #e79c17;">1- Background Color</h3>
<p><strong><em>background-color: #FFFFFF;</em></strong><br />
This CSS property applies a white (#FFFFFF) background color to the HTML container it is applied to.</p>
<h3 style="color: #e79c17;">2- Background Image</h3>
<p><strong><em>background-image:  url(images/bgheader.gif);</em><br />
<span style="font-weight: normal;">The value &#8220;images/bgheader.gif&#8221; in </span> url </strong>defines the relative HTML path to the background image graphic (<strong>bgheader.gif</strong> in this example).</p>
<p>This HTML path can be absolute: <em>url(http://livetrainingsession.com/images/bgheader.gif) </em><br />
or relative to the location of the external style sheet file  where the CSS style is defined.</p>
<p>If your CSS style is embedded in the web page, then the url path will be relative to that webpage.<br />
<em> </em></p>
<h3 style="color: #e79c17;">3- Background Image Tiling</h3>
<p><strong><em>background-image:  url(images/bgheader.gif) repeat;</em></strong></p>
<p>The background image will be then tiled in both the horizontal (x) and vertical (y) directions to fill the entire surface of the HTML container this background-image is applied to.<br />
The tiling effect in the x-axis will be only be visible if the width of the background image is smaller then the width of the HTML container. The same goes for the vertical y-axis.</p>
<p>If however all you need is for the background image to tile in just one direction within its container, all you need is specify the axis along which the tiling would take place:</p>
<p><em><strong> background: url(/images/bgimage.jpg) repeat x;</strong></em><br />
would instruct the web browser to tile (or repeat) the background image horizontally (along the x axis) from left to right.</p>
<p><strong><em>background: url(/images/bgimage.jpg) repeat y;</em></strong><br />
would create the effects of the background image  tiling along the vertical direction (y axis) from top to bottom.</p>
<p>As you already suspected when the tiling need to be done along both directions (x and y) there is no need to specify either one of them. It&#8217;s the default behavior.</p>
<h3 style="color: #e79c17;">4- Background Image Attachment</h3>
<p><strong><em>background-image:  url(images/bgheader.gif) repeat fixed;</em></strong><br />
The &#8220;fixed&#8221; background attachment keeps the background image in the same spot while the content of the HTML container is scrolled.<br />
This behavior can be particularly desirable when applying a company logo as the background image of the HTML &#8220;body&#8221; tag of a web page.</p>
<p><strong><em>background-image:  url(images/bgheader.gif) repeat scroll;</em></strong><br />
The background will move along when all the content is scrolled within the container. The &#8220;scroll&#8221; value of the background attachment is the default behavior. That means, there is really no need to specify the background attachment &#8220;scroll&#8221; value.</p>
<h3 style="color: #e79c17;">5- Background Image Position</h3>
<p><strong><em><span style="font-weight: normal;"><span style="font-style: normal;">You can specify the placement of the background image within the HTML element it&#8217;s applied to.</span></span><br />
background: url(/images/bgimage.jpg) no-repeat 10px 15px;</em></strong></p>
<p>The background image applied to the HTML container will not be tiled (no-repeat) and is positioned 10 pixels from the left edge and 15 pixels from the top edge of its container. We define pixels as the measurement unit but you could choose any other valid units such as points (pt), inches (in), cm, ems, percentage (%) and so on.</p>
<p>In most cases you certainly would want the background image to start at the top left corner of the container box. In that case w you would set:<br />
<strong><em>background-image: url(/images/bgimage.jpg) no-repeat 0 0;</em></strong></p>
<p>The x and y position of the background image are 0.  In this instance there is no need specify the measurement unit.</p>
<p><strong>background: url(/images/bgimage.jpg) no-repeat  left top;</strong><br />
Instead using the value 0 0 to position the background image, you could use &#8220;left&#8221; &#8220;top&#8221; to achieve the same result of align the background image with the top-left corner.</p>
<p>It&#8217;s worth mentioning that when a background image is repeated (repeat, repeat-x or repeat-y), you can not define a position x, y where the tiling</p>
<h3 style="color: #e79c17;">6- Background Color &amp; Background Image</h3>
<p>As with most CSS properties, there is a shorthand way to define both the background color and the background image properties in a more compact form to reduce your style sheet file size.<br />
The generic form is :<br />
<em><strong> background: color url(path to background image) repeat attachment position;</strong></em></p>
<p>Therefore to apply a white background color and a background image to a HTML element with an CSS identifier  <strong>#header</strong>, you would write:<br />
<strong><em> #header{<br />
background: #FFFFFF url(images/bgheader.gif) no-repeat 10px 15px;<br />
}</em></strong></p>
<p>With CSS3 you can in theory apply more than one background image to any HTML container.<br />
Unfortunately just like other recommendations made by the W3C (Worldwide Web Consortium) not all major browsers support this new feature notably IE6, IE7 and IE8. In the meantime, you would have to combine some HTML and CSS tricks to apply multiple background images to a given block in your web page layout.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.livetrainingsession.com/tips/2010/01/css-background-color-and-background-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
