<?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>Lost Resort Blog &#187; Web Design</title>
	<atom:link href="http://www.lostresort.biz/blog/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lostresort.biz/blog</link>
	<description>Talking about us and about web site development</description>
	<lastBuildDate>Thu, 08 Jul 2010 11:34:37 +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>How to create navigational menus using only images</title>
		<link>http://www.lostresort.biz/blog/2009/10/29/how-to-create-navigational-menus-using-only-images/</link>
		<comments>http://www.lostresort.biz/blog/2009/10/29/how-to-create-navigational-menus-using-only-images/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 11:41:59 +0000</pubDate>
		<dc:creator>Cristi_N</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[horizontal menus with images]]></category>
		<category><![CDATA[menus]]></category>

		<guid isPermaLink="false">http://www.lostresort.biz/blog/?p=517</guid>
		<description><![CDATA[Pre-Requisites: We want to create a navigational menu using a fancy font-type which looks great on our website. But, we want to achieve this effect not using any JavaScript library or any flash object and we want this menu to be similar in functionality with any other menu that uses text in anchor links. Creating [...]]]></description>
			<content:encoded><![CDATA[<p><b>Pre-Requisites</b>: We want to create a navigational menu using a fancy font-type which looks great on our website. But, we want to achieve this effect not using any JavaScript library or any flash object and we want this menu to be similar in functionality with any other menu that uses text in anchor links.</p>
<h3>Creating the menu</h3>
<p>The solution I will present I find it simple and easy to implement. We will create a navigational menu using an unordered list of anchor links displayed on one line, and we use different background images for each element to create the desired effect. The HTML code will be as following:</p>
<blockquote><p>
              <code><</code>ul id="buttons"<code>></code><br />
				<code><</code>li id="home"<code>></code><code><</code>a href="#"<code>></code>Home<code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li id="services"<code>></code><code><</code>a href="#"<code>></code>Services<code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li id="about_us"<code>></code><code><</code>a href="#"<code>></code>About Us<code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li id="partners"<code>></code><code><</code>a href="#"<code>></code>Partners<code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li id="policy"<code>></code><code><</code>a href="#"<code>></code>Policy<code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li id="contact"><code><</code>a href="#"<code>></code>Contact<code><</code>/a<code>></code><code><</code>/li<code>></code><br />
	    <code><</code>/ul><code>></code>
</p></blockquote>
<p>Nothing complicated so far.</p>
<p>The CSS style properties that we will use are:</p>
<blockquote><p>
ul#button li{float:left;padding:0;margin:0.1em 0.1em 0 0.1em;width:110px;height:40px;text-align:center}<br />
ul#button li a{text-decoration:none;color:#ffffff;display:block;height:40px;font-size:0px;line-height:0px}<br />
#home{background:url(images/buttons_sprite.png) no-repeat 0 0}<br />
li#home a:hover{background:url(images/buttons_sprite.png) no-repeat 0 -41px}<br />
#services{background:url(images/buttons_sprite.png) no-repeat -110px 0}<br />
li#services a:hover{background:url(images/buttons_sprite.png) no-repeat -110px -41px}<br />
#about_us{background:url(images/buttons_sprite.png) no-repeat -220px 0}<br />
li#about_us a:hover{background:url(images/buttons_sprite.png) no-repeat -220px -41px}<br />
#partners{background:url(images/buttons_sprite.png) no-repeat -330px 0}<br />
li#partners a:hover{background:url(images/buttons_sprite.png) no-repeat -330px -41px}<br />
#policy{background:url(images/buttons_sprite.png) no-repeat -440px 0}<br />
li#policy a:hover{background:url(images/buttons_sprite.png) no-repeat -440px -41px}<br />
#contact{background:url(images/buttons_sprite.png) no-repeat -550px 0}<br />
li#contact a:hover{background:url(images/buttons_sprite.png) no-repeat -550px -41px}</p>
</blockquote>
<p>As you can see, we will use one image which will incorporate all the necessary images we need, 6 for each active item and another 6 for roll-over effect. In this circumstances it will be one server request (instead of having 12 for all elements) for background images. Using the <code>background-position</code> CSS style property and setting a <code>width</code> and a <code>weight</code> for each list item we can control the appearance of the list elements. Setting the <code>font-size</code><br />
to <code>0px</code> the text should not be displayed. But in Safari and Chrome if you set it to <code>0px</code> or <code>0em</code> somewhat the text is displayed, even its dimension is reduced. Adding <code>line-height</code> property and set it to <code>0px</code> will make the text disappear forever.</p>
<h3>Conclusions</h3>
<p>With this method you can have the appearance you want for your menu using only images with the help of <code>CSS</code> style properties, with the font type you want, and with the good format of the HTML page code in accordance with the <code>SEO</code> requirements.</p>
<p>Follow this link and see few examples on <a href="http://www.lostresort.biz/examples/rollover/create-menus-using-only-images.html">how to create menus using only images</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lostresort.biz%2Fblog%2F2009%2F10%2F29%2Fhow-to-create-navigational-menus-using-only-images%2F&amp;linkname=How%20to%20create%20navigational%20menus%20using%20only%20images"><img src="http://www.lostresort.biz/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.lostresort.biz/blog/2009/10/29/how-to-create-navigational-menus-using-only-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using absolute or relative values for measurement units</title>
		<link>http://www.lostresort.biz/blog/2009/07/21/using-absolute-or-relative-values-for-measurement-units/</link>
		<comments>http://www.lostresort.biz/blog/2009/07/21/using-absolute-or-relative-values-for-measurement-units/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 12:37:32 +0000</pubDate>
		<dc:creator>Cristi_N</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[absolute values for measurement units]]></category>
		<category><![CDATA[measurement units for margin padding width height]]></category>
		<category><![CDATA[pixel or em]]></category>
		<category><![CDATA[relative values for measurement units]]></category>

		<guid isPermaLink="false">http://www.lostresort.biz/blog/?p=476</guid>
		<description><![CDATA[To display elements in the way we desire we have to follow some rules, which means that, if we want to position an element inside a web page or to set the font size of the text, we can use some CSS style properties (such as margin, padding, font-size etc.) and eventually we can acquire [...]]]></description>
			<content:encoded><![CDATA[<p>To display elements in the way we desire we have to follow some rules, which means that, if we want to position an element inside a web page or to set the font size of the text, we can use some <code>CSS</code> style properties (such as <code>margin</code>, <code>padding</code>, <code>font-size</code> etc.) and eventually we can acquire the same result on most web user agents. The goal is to have the same result in all major web browsers. At this time we are talking about Mozilla Firefox, Internet Explorer, Opera, Safari and Chrome.</p>
<h3>CSS units for measurements</h3>
<p>According to W3 Consortium <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-length">lengths refer to horizontal or vertical measurements</a> and there are two types of length units: <em>relative</em> and <em>absolute</em>. Using relative units means that the scale from one medium to another will be more easily.</p>
<p>Relative units are:</p>
<ul>
<li><b>em</b>: the &#8216;font-size&#8217; of the relevant font</li>
<li><b>ex</b>: the &#8216;x-height&#8217; of the relevant font</li>
<li><b>px</b>: pixels, relative to the viewing device</li>
</ul>
<p>The absolute units are:</p>
<ul>
<li><b>in</b>: inches — 1 inch is equal to 2.54 centimeters.</li>
<li><b>cm</b>: centimeters</li>
<li><b>mm</b>: millimeters</li>
<li><b>pt</b>: points — the points used by CSS 2.1 are equal to 1/72nd of an inch.</li>
<li><b>pc</b>: picas — 1 pica is equal to 12 points.</li>
</ul>
<p><cite title="http://www.w3.org/TR/CSS21/syndata.html#value-def-length">Absolute length units are only useful when the physical properties of the output medium are known</cite> and with this, the discussion about these measurement units is closed. </p>
<p>The most known and used units within <code>CSS</code> style sheets are <em>em</em> and <em>px</em>. One is relative to the relevant font and the other is relevant to the viewing device. </p>
<h3>Using <em>em</em> as measurement unit</h3>
<p>If we check the properties for our default (or many) web browser we will see that the default font size is set to <b>16px</b>. A good approach is to define the <code>font-size</code> style attribute for the elements displayed in a web page to <b>62.5%</b> which means that <b>1em</b> measurement unit will be equal to <b>10px</b> (simple calculation <b>62.5%*16px = 10px</b>), or to directly declare <code>font-size:10px</code>. This is good because if we define a <b>1.1 em</b> unit it is translated to <b>11px</b> and so on. On the other hand if we are using values with more than one digit to represent non-integer values, problems may occur because, using values like <code>1.2345em</code> cannot split a pixel to the desired value (<b>1.2345*10px = 12.345px</b>) and the measurement unit will take the rounded value. The problem comes when the subvalue is half of the value, because there is a different behavior among the top wide-spread web browser on rounding these values. Some of them will round the subvalues up (IE 6 and IE 7) and some of them will round the subvalues down (Opera and Safari) and Firefox tends to round both up and down. With this approach the result will not be the same on different web browsers.</p>
<p>So, a good behavior is to use as much as possible multiplying values that in the end will compute integer values (measured as <em>pixels</em>). <a href="http://pxtoem.com/" title="Useful tool to transform px to em units">Take a look at this application which transforms <code>px</code> to <code>em</code> values and viceversa.</a></p>
<h3>Using <em>px</em> as measurement unit</h3>
<p>Because the content of the web pages is mostly served as graphic representation through an user agent to the audience a good reflex might be to set all measurement units using <code>px</code> values. This approach tends to be necessary and most desirable when the <code>width</code> and <code>height</code> style properties are declared, and even the measurement unit is relative to the viewing device, in absolute values the space occupied is the same. </p>
<h3>Using a mix of <em>em</em> and <em>px</em> as measurement units</h3>
<p>Another option is to use <em>px</em> as a measurement unit to declare some style properties, such as <code>width</code>, <code>height</code>, <code>background-position</code> or <code>letter-spacing</code>, and <em>em</em> measurement unit to declare another style properties like <code>margin</code>, <code>padding</code>, <code>line-height</code>, <code>font-size</code> or <code>text-indent</code>. In the last case, the properties will follow the size of the text font.</p>
<h3>Conclusions for what measurement units to use</h3>
<p>Based on whatever option we chose and use for measurement units it&#8217;s good to follow some practices.</p>
<p>A good start is to declare explicitly the <code>font-size</code> for the <code>body</code> element to a fixed value of <b>10px</b>. In this case the control of the sizes isn&#8217;t influenced by the default font size value on users&#8217; web browser. If we set the value as a percent (<b>62,5%</b>) relative to the default web browser&#8217;s font size value, and if this value is different from <b>16px</b>, problems may occur. </p>
<p>Use <em>px</em> as a measurement unit for <code>width</code> and <code>height</code> of the elements. You may find that in IE7 <code>11em</code> is not equal with <code>110px</code> when you set the <code>width</code> of an element (assuming that <b>1em = 10px</b>).</p>
<p>When we use <em>em</em> as measurement unit is better to define subvalues of it with one digit. Using more than one could lead to some unexpected displaying behavior on some web browsers which can make the web site pages look messy.</p>
<p>Also, some attention should be given on inheritance on <code>DOM</code> tree. Changing the <code>font-size</code> value, after the initial declaration of <b>10px</b>, should be made using the <em>em</em> measurement unit. Using <em>px</em> to declare the font size of an element will also modify the value of <em>em</em> measurement unit.</p>
<p>Today web browsers developers tend to adhere to <code>HTML</code> and <code>CSS</code> standards more accurately than a few years ago, and for a web site developer this represents less time consumed for fixing bugs for old versions of user agents. I hope that one day in the near future, the old versions browser will be gone for ever, and the <code>HTML</code> and <code>CSS</code> standards will be implemented in the same way in all major browsers.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lostresort.biz%2Fblog%2F2009%2F07%2F21%2Fusing-absolute-or-relative-values-for-measurement-units%2F&amp;linkname=Using%20absolute%20or%20relative%20values%20for%20measurement%20units"><img src="http://www.lostresort.biz/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.lostresort.biz/blog/2009/07/21/using-absolute-or-relative-values-for-measurement-units/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Building horizontal navigation menus</title>
		<link>http://www.lostresort.biz/blog/2009/04/23/building-horizontal-navigational-menus/</link>
		<comments>http://www.lostresort.biz/blog/2009/04/23/building-horizontal-navigational-menus/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 11:04:43 +0000</pubDate>
		<dc:creator>Cristi_N</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[floating elements for navigational menu]]></category>
		<category><![CDATA[horizontal navigation menu]]></category>
		<category><![CDATA[inline elements for navigational menu]]></category>
		<category><![CDATA[navigation menus]]></category>

		<guid isPermaLink="false">http://www.lostresort.biz/blog/?p=376</guid>
		<description><![CDATA[Almost every website on the Internet has a navigational menu constructed horizontally or vertically. Simple or more complex with drop-down sub-items, it&#8217;s presence is necessary to lead the visitor(s) to the desired information inside the website. There are quite enough methods to build navigational menus, and I&#8217;ll give my opinion on few of them. Use [...]]]></description>
			<content:encoded><![CDATA[<p>Almost every website on the Internet has a navigational menu constructed horizontally or vertically. Simple or more complex with drop-down sub-items, it&#8217;s presence is necessary to lead the visitor(s) to the desired information inside the website. There are quite enough methods to build navigational menus, and I&#8217;ll give my opinion on few of them.</p>
<h3>Use of table for building the menu</h3>
<p>HTML element <code><</code>table<code>></code> has the advantage of being well implemented in all major browsers, so no displaying issues when it's content is deployed. The idea is simple, to create only one table row, with one data cell for each item menu. Using the CSS style attributes the menu will get the appearance it needs.</p>
<p>The HTML code is a follows:</p>
<blockquote><p>
                       <code><</code>table<code>></code><br />
				<code><</code>tr<code>></code><br />
				<code><</code>td<code>></code><code><</code>a href=""<code>></code>Item 1<code><</code>/a<code>></code><code><</code>/td<code>></code><br />
				<code><</code>td<code>></code><code><</code>a href=""<code>></code>Second Item<code><</code>/a<code>></code><code><</code>/td<code>></code><br />
				<code><</code>td<code>></code><code><</code>a href=""<code>></code>Third One<code><</code>/a<code>></code><code><</code>/td<code>></code><br />
				<code><</code>td<code>></code><code><</code>a href=""<code>></code>Item 4<code><</code>/a<code>></code><code><</code>/td<code>></code><br />
				<code><</code>td<code>></code><code><</code>a href=""<code>></code>Fifth in the row<code><</code>/a<code>></code><code><</code>/td<code>></code><br />
				<code><</code>td<code>></code><code><</code>a href=""<code>></code>LastItem<code><</code>/a<code>></code><code><</code>/td<code>></code><br />
				<code><</code>/tr<code>></code><br />
			<code><</code>/table<code>></code>
</p></blockquote>
<p>We can add some style to the table appearance and be sure you set the <code>border-collapse</code> property to <code>collapse</code> so no spaces are between data cells and borders are collapsed into a single border when possible. A detailed presentation of this style property can be found at <a href="http://www.w3schools.com/Css/pr_tab_border-collapse.asp" title="W3 Schools CSS border-collapse property">W3 Schools CSS border-collapse property</a> page.</p>
<h3>Using unordered list items to create navigational menu</h3>
<p>Using the items of an unordered list to create the navigational menu is, maybe, the most used technique.<br />
Comparing with the previous method it requires almost the same number of lines for CSS styles, and the effect is similar. To display items horizontally you can use the <code>display:inline</code> style property, so the elements of the unordered list are displayed in the same line, like a row of elements. Setting the item elements to be displayed as inline elements, make them "unmovable" on y axis, which means that using padding or margin property to arrange the way they are displayed has no effect. But giving some values to <code>height</code> or/and <code>line-height</code> properties this issue can be easily handled.</p>
<p>Another way to display the elements on the same row is to float the list-items of the unordered list to left. This method tends to be more desired then the previous and the result is much similar with the menu created using table elements.</p>
<p>Following the next link you can see <a href="http://www.lostresort.biz/examples/build-navigational-menu/build-horizontal-menu.html" title="Building horizontal navigational menu">a few examples of horizontal navigational menus</a> using the methods described above. I left the style properties unaltered so you can see on different web browser how the menus are displayed. </p>
<h3>Adding some graphic style to the menu</h3>
<p>Using background images for the elements of the menu creates a nice and more desired visual effect. Even if you use a repeated background image or you create a little more sophisticated rounded corner button for your menu you definitely add a bit of color to the (maybe) flat HTML page. In the next line I'll give some hints on how to create these rounded corner buttons.</p>
<h3>Creating rounded corner buttons for the navigational menu</h3>
<p>The simplest approach may be to create a button with a given width and height and use it as a background image for each item of the menu. This will work fine in situations when the text of the menu items has the same length or the differences are insignificant.</p>
<h4>Split image for the background</h4>
<p>Another method is to split the images in two parts and build the menu items using besides the <code>anchor</code> element an additional <code>span</code> element. The code for the menu will look like:</p>
<blockquote><p>
                       <code><</code>ul id="split"<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code>Item 1<code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code>Second Item<code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code>Third One<code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code>Item 4<code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code>Fifth in the row<code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code>Last Item<code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
			<code><</code>/ul<code>></code>
</p></blockquote>
<p>The idea is to set the <code>display:block</code> property for <code>anchor</code> and <code>span</code> elements, and using the <code>padding</code> values the items are displayed correctly with the desired effect, which means that the width of each item will follow the length of the text. Note that the image on the right side in this case should have a width which is greater than the length of the text with the values for the left and right padding added; otherwise the background image will be broken.</p>
<h4>Using two <code>span</code> elements for the right and left margins</h4>
<p>In this case the image is split in three parts, one for the right margin, second for the left margin and the third one for the middle. This last one image may have a width as small as possible, because it can be repeated on x axis. The HTML code of the menu will be as follows:</p>
<blockquote><p>
                       <code><</code>ul id="split3"<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code><code><</code>span<code>></code>Item 1<code><</code>/span<code>></code><code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code><code><</code>span<code>></code>Second Item<code><</code>/span<code>></code><code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code><code><</code>span<code>></code>Third One<code><</code>/span<code>></code><code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code><code><</code>span<code>></code>Item 4<code><</code>/span<code>></code><code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code><code><</code>span<code>></code>Fifth in the row<code><</code>/span<code>></code><code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
				<code><</code>li<code>></code><code><</code>a href=""<code>></code><code><</code>span<code>></code><code><</code>span<code>></code>Last Item<code><</code>/span<code>></code><code><</code>/span<code>></code><code><</code>/a<code>></code><code><</code>/li<code>></code><br />
			<code><</code>/ul<code>></code>
</p></blockquote>
<p>The good part for this method is that the padding values can be set just for the last <code>span</code> element, and this is enough to reach the desired effect. Even we have more CSS and HTML code for this last method I think is more simple than the previous one, because you don't have to tweak <code>padding</code> values to have all elements aligned.</p>
<p>Please follow this link to see (and download files) examples of <a href="http://www.lostresort.biz/examples/build-navigational-menu/build-horizontal-menu.html" title="Building horizontal navigational menu">building navigational menus</a> using the method I've described.</p>
<p><strong>The resulted page was tested on Firefox v3.0.9., Internet Explorer v6.0, v7.0 and v8.1, Opera v9.63, Safari v3.2.1 and Google Chrome.</strong></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lostresort.biz%2Fblog%2F2009%2F04%2F23%2Fbuilding-horizontal-navigational-menus%2F&amp;linkname=Building%20horizontal%20navigation%20menus"><img src="http://www.lostresort.biz/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.lostresort.biz/blog/2009/04/23/building-horizontal-navigational-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Difference between italic and emphasis HTML elements</title>
		<link>http://www.lostresort.biz/blog/2009/01/19/difference-between-italic-and-emphasis-html-elements/</link>
		<comments>http://www.lostresort.biz/blog/2009/01/19/difference-between-italic-and-emphasis-html-elements/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 11:30:21 +0000</pubDate>
		<dc:creator>Cristi_N</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[difference between i and em HTML elements]]></category>

		<guid isPermaLink="false">http://www.lostresort.biz/blog/?p=244</guid>
		<description><![CDATA[Nowadays, when you are visiting websites on the Internet, you are almost familiar with the way some words or even phrases render differently from a regular (normal) font type. The Italic refers to &#8220;cursive typefaces based on a stylized form of calligraphic handwriting&#8221;, and the font style originated in Italy. The influence from calligraphy can [...]]]></description>
			<content:encoded><![CDATA[<p>Nowadays, when you are visiting websites on the Internet, you are almost familiar with the way some words or even phrases render differently from a regular (normal) font type.</p>
<p>The <em>Italic</em> refers to <cite title="According to Wiki">&#8220;cursive typefaces based on a stylized form of calligraphic handwriting&#8221;, and the font style originated in Italy</cite>. The influence from calligraphy can be seen in their usual slight slanting to the right, and is definitely different from what does mean oblique writing.<br />
<strong>When you may use <code><</code>i<code>></code> HTML element?</strong> It is recommended to use the &lt;<code>i</code>&gt; HTML element when you want to define terms (i.e. "the <i>prime</i> number is a natural number which has exactly two distinct natural number divisors: 1 and itself"), to emphasis foreign words (i.e. "<i>Au revoir</i> - she said, touching his hand with a tender gesture.", names of ships (i.e. "<i>Titanic</i> sunk at it's first and only journey.") etc.<br />
In typography, <cite title="According to Wiki"><strong>emphasis</strong> is the exaggeration of words in a text with a font in a different style from the rest of the text—to emphasis them</cite>. So, in this situation, <em>emphasis</em> could mean an italic or an oblique or a bold face font type, or even small caps or adding space between letters.<br />
A web browser displays the words between the <code><</code>em<code>></code> HTML starting and ending tag most often as an </strong>italic</strong> writing, but some browsers can show the text in a different way.<br />
On the other hand if you think from a search engine optimization for your content, it seems that using <code><</code>em<code>></code> rather than <code><</code>i<code>></code> HTML element will give to your words more importance.</p>
<p>As a conclusion, the text effect using the <code><</code>i<code>></code> HTML element can be achieved using Cascading Style Sheets rules, and the use of this element could be deprecated to some point. Using <code><</code>em<code>></code> instead will add more importance to your words or sentences and in most cases the visual effect will be the same.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lostresort.biz%2Fblog%2F2009%2F01%2F19%2Fdifference-between-italic-and-emphasis-html-elements%2F&amp;linkname=Difference%20between%20%3Ci%3Eitalic%3C%2Fi%3E%20and%20%3Cem%3Eemphasis%3C%2Fem%3E%20HTML%20elements"><img src="http://www.lostresort.biz/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.lostresort.biz/blog/2009/01/19/difference-between-italic-and-emphasis-html-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Z-order positioning using z-index style property</title>
		<link>http://www.lostresort.biz/blog/2008/08/31/z-order-positioning-using-z-index-style-property/</link>
		<comments>http://www.lostresort.biz/blog/2008/08/31/z-order-positioning-using-z-index-style-property/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 18:21:15 +0000</pubDate>
		<dc:creator>Cristi_N</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[positioned elements]]></category>
		<category><![CDATA[z-index property]]></category>

		<guid isPermaLink="false">http://www.lostresort.biz/blog/?p=61</guid>
		<description><![CDATA[According to the W3C CSS 2.1 specifications using z-index property for a positioned box element a stack level can be set and the element can be placed &#8220;behind&#8221; (far from user who faces the screen) or &#8220;in front of&#8221; (closer to the user) another element. In CSS 2.1, each box has a position in three [...]]]></description>
			<content:encoded><![CDATA[<p>According to the <a href="http://www.w3.org/TR/CSS21/visuren.html#z-index">W3C CSS 2.1 specifications</a> using z-index property for a positioned box element a stack level can be set and the element can be placed &#8220;behind&#8221; <em>(far from user who faces the screen)</em> or &#8220;in front of&#8221; <em>(closer to the user</em>) another element. In CSS 2.1, each box has a position in three dimensions, vertical, horizontal and a &#8220;z-axis&#8221; and are formatted <strong>one on top of the other</strong>. Z-axis positions are particularly relevant when <strong>boxes overlap visually</strong>. As a Web Designer you may face situations when elements create strange behavior on a particular web browser. Known situations can be an <strong>inaccessible anchor</strong> <strong>(link)</strong> (pointing the mouse cursor over it doesn&#8217;t produce any effect such as mouse pointer change and an action on user&#8217;s click), a <strong>background image which does not appear correctly</strong> and maybe the most common example a <strong>JavaScript drop down menu</strong> which produce a relevant effect on what <em>&#8220;one element on top of the other&#8221;</em> means. The z-index style property can be set on any integer value, positive or negative, and note that the greatest value draws the element in front of the other elements with smaller z-index value.</p>
<h3>An example with three positioned division elements one on top of the other</h3>
<p>Follow this link and you will see how <a href="http://www.lostresort.biz/examples/z-index.html">z-indes style property places overlapped boxes</a>. It presents three <strong>&lt;<code>div</code>&gt;</strong> elements, all positioned relatively inside the body container, and inside the first division element are three anchors also positioned relatively. These three containers overlap visually and they are one on top of the other. If the web browser you are using is standard complying according to <a href="http://www.w3.org/TR/CSS21/visuren.html">W3C CSS 2.1 specifications</a> the anchor <em>Link2</em> and <em>Link3</em> are not accessible because of the other two containers which are positioned on the top of first container and they cover those two anchors. Setting a value for the z-index style property, following the specifications, for the <em>Link 2</em> and <em>Link 3</em> anchors make them accessible and these links can be followed. The good browsers are Firefox v2 (and above) and Safari v3.1. The bad user agents are Internet Explorer v6 and v7 and unfortunately Opera v9.52. These last browsers don&#8217;t make any deference between the two situations, and wrongly display the positioned anchor elements.</p>
<p><strong style="color:red"><em>Given Situation: HTML page was constructed using a division container which encapsulates three positioned division elements which are siblings on DOM tree, first one encapsulating three positioned anchor elements.</em></strong></p>
<h3>An overview for a dropdown JavaScript menu</h3>
<p>Searching some information on the Internet, I landed on <a href="http://sitecore.net">Sitecore Website</a>. The layout is clean, the colors are well positioned and the information is presented in a professional way. First screenshot presents the landing main page.</p>
<p><img title="Sitecore website screenshot - main page" src="http://www.lostresort.biz/blog/wp-content/uploads/2008/08/sitecore5.png" alt="Sitecore Website Screenshot" style="width:600px" /></p>
<p>Quite nice I might say. But, since the beginning they have a style issue in the presentation page. The white area over the dark grey background definitely has some text for visitors but, unfortunately the text and the background has the same color, white. Anyway, this does not have an important impact on users interaction as the menu has.<br />
The menu, as you can see in the screenshot, it&#8217;s an unordered list with left floating elements on the top area of the page. Starting from this point, at user&#8217;s action mouse over, a sub menu is displayed, showing relevant links in site. Unfortunately it is not constructed well for all user agents and operating systems, and because the stack level for the sub menu is lower than the stack level for some heading (and other) elements, and when they are sharing the same screen area, the elements of the list in the sub menu are covered by the area of the heading element, and they are not displayed properly. The next screenshots show the undesirable behavior for the sub menu.</p>
<p><img title="Sitecore website screenshot - hidden menu" src="http://www.lostresort.biz/blog/wp-content/uploads/2008/08/sitecore3.png" alt="Sitecore Website Screenshot" style="width:600px" /></p>
<p>and another one &#8230;</p>
<p><img title="Sitecore website screenshot - hidden menu" src="http://www.lostresort.biz/blog/wp-content/uploads/2008/08/sitecore1.png" alt="Sitecore Website Screenshot" style="width:600px" /></p>
<p>and another one &#8230;</p>
<p><img title="Sitecore website screenshot - hidden menu" src="http://www.lostresort.biz/blog/wp-content/uploads/2008/08/sitecore2.png" alt="Sitecore Website Screenshot" style="width:600px" /></p>
<p>and the last one &#8230;</p>
<p><img title="Sitecore website screenshot - hidden menu" src="http://www.lostresort.biz/blog/wp-content/uploads/2008/08/sitecore4.png" alt="Sitecore Website Screenshot" style="width:600px" /></p>
<p>All screenshots present the sub menu which is not <strong>&#8220;in front of other elements&#8221;</strong> like the heading on top. The purpose for any menu is to create access to the website pages. If is interrupted in some way, many visitors will think negative about the intentions of the creator of the website.<br />
Setting a value for the z-index style property for the container which holds the anchors of the sub menu will make it visible in front of any other page element.</p>
<p><strong style="color:red"><em>Given situation: All screenshots were taken using Firefox v3.0.1 user agent on Ubuntu (Hardy Heron) operating system. The behavior described above is a particular situation for the given operating system and the user agent.</em></strong></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lostresort.biz%2Fblog%2F2008%2F08%2F31%2Fz-order-positioning-using-z-index-style-property%2F&amp;linkname=Z-order%20positioning%20using%20z-index%20style%20property"><img src="http://www.lostresort.biz/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.lostresort.biz/blog/2008/08/31/z-order-positioning-using-z-index-style-property/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to create containers with rounded corners</title>
		<link>http://www.lostresort.biz/blog/2008/07/24/how-to-create-container-with-rounded-corners/</link>
		<comments>http://www.lostresort.biz/blog/2008/07/24/how-to-create-container-with-rounded-corners/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 16:53:30 +0000</pubDate>
		<dc:creator>Cristi_N</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[rounded corners using images; rounded corners without images; rounded corners container using CSS]]></category>

		<guid isPermaLink="false">http://www.lostresort.biz/blog/?p=13</guid>
		<description><![CDATA[In this days a element or a container with rounded corners creates a nice visual effect when navigating a website page. The effect can be done using some small size images, or with only pure and simple HTML code, without any images. If you wonder how can this be achieved I'll present a few techniques [...]]]></description>
			<content:encoded><![CDATA[<p>In this days a <<code>div</code>> element or a container with rounded corners creates a nice visual effect when navigating a website page. The effect can be done using some small size images, or with only pure and simple HTML code, without any images. If you wonder how can this be achieved I'll present a few techniques which may help you to create a box or a container with rounded corners, with some of my comments on each one. </p>
<h3>Nifty corners</h3>
<p>First one it's a simple and in some way useful choice of creating rounded corners using Nifty corners. The techniques involves no images just a few lines of HTML code. The idea belongs to Alessandro Fulciniti (we were borne in the same year <img src='http://www.lostresort.biz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) and the main article can be found <a href="http://www.html.it/articoli/nifty/index.html">here</a>. He presents very well how to make a container with rounded corners. It works like this: you have a container when you want to place some text; on top and on the bottom of the <<code>div</code>> element a few <<code>b</code>> elements appear and using some <i>margin</i> attributes for the <<code>b</code>> elements the effect is created. Very simple and efficient.</p>
<p>The result can be seen <a href="http://www.html.it/articoli/nifty/nifty1.html">here</a>.</p>
<p>The HTML code for this container is presented bellow.</p>
<blockquote><p>
<<code>div id="container"</code>><br />
<<code>b class="rtop"</code>><br />
  <<code>b class="r1"</code>><<code>/b</code>> <<code>b class="r2"</code>><<code>/b</code>> <<code>b class="r3"</code>><<code>/b</code>> <<code>b class="r4"</code>><<code>/b</code>><br /><<code>/b</code>><br />
<<code>!--content goes here --</code>><br />
<<code>b class="rbottom"</code>><br />
  <<code>b class="r4"</code>><<code>/b</code>> <<code>b class="r3"</code>><<code>/b</code>> <<code>b class="r2"</code>><<code>/b</code>> <<code>b class="r1"</code>><<code>/b</code>><br />
<<code>/b</code>><br />
<<code>/div</code>>
</p>
</blockquote>
<p>and the CSS attributes for the elements are on the next lines:</p>
<blockquote><p>
.rtop, .rbottom{display:block}<br />
.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden}<br />
.r1{margin: 0 5px}<br />
.r2{margin: 0 3px}<br />
.r3{margin: 0 2px}<br />
.r4{margin: 0 1px; height: 2px}
</p>
</blockquote>
<p>It's good to note that, because <<code>b</code>> is an <em>inline element</em>, and to be able to change the margin attribute we have to make it a <em>block element</em>, and this is accomplished using the CSS attribute <strong>{display:block}</strong>.</p>
<p>Quite impressionable I can say <img src='http://www.lostresort.biz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<h3>Rounded corners using images for top and bottom area</h3>
<p>This second method is, I think, the most widespread technique for creating containers with rounded corners. The idea is to generate an image for the container's background, and split it in three pieces, one for the top area, another for the bottom area and the third one for the middle section. The height size of the last one can be as small as possible</p>
<p>The HTML code consists in only few lines:</p>
<blockquote><p>
<<code>div id="container"</code>><br />
	<<code>p class="top"</code>>some text here<<code>/p</code>><br />
	<<code>p</code>>some content here<<code>/p</code>><br />
	<<code>p</code>>some content here<<code>/p</code>><br />
	<<code>p class="bottom"</code>>some text here<<code>/p</code>><br />
<<code>/div</code>>
</p>
</blockquote>
<p>and the styles look like:</p>
<blockquote><p>
#container{margin:20px;background:url(middle.png) center repeat-y;width:420px}<br />
.top{background:url(top.png) no-repeat}<br />
.bottom{background:url(bottom.png) bottom no-repeat}<br />
p{padding:8px 10px 5px 20px}
</p>
</blockquote>
<p>Following this link you can see <a href="http://www.lostresort.biz/examples/rounded/rcexample.html">an example of rounded corners container</a>.</p>
<p>It's simple and more efficient than previous one, because in this case a border can be used, and it creates a nice visual effect. Note that, all images have less than 1Kb in size. Also the top <<code>p</code>> element can be replaced with a heading tag, like <<code>h3</code>>, so the container looks more interesting.</p>
<h3>Rounded corners using an image for each corner</h3>
<p>This method uses for each corner a small image representing the corner itself. It is very well presented <a href="http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners-borders.shtml">here</a> with a lot of comments how to create it.</p>
<p>Let's take a look at the HTML code:</p>
<blockquote><p>
<<code>div class="t"</code>><br />
<<code>div class="b"</code>><br />
<<code>div class="l"</code>><br />
<<code>div class="r"</code>><br />
<<code>div class="bl"</code>><br />
<<code>div class="br"</code>><br />
<<code>div class="tl"</code>><br />
<<code>div class="tr"</code>><br />
<<code>!--content goes here--</code>><br />
<<code>/div</code>><br />
<<code>/div</code>><br />
<<code>/div</code>><br />
<<code>/div</code>><br />
<<code>/div</code>><br />
<<code>/div</code>><br />
<<code>/div</code>><br />
<<code>/div</code>>
</p>
</blockquote>
<p>As you can see to achieve this effect this method needs <strong>eight</strong> <<code>div</code>> elements, which is quite consistent. This piece of code has exactly 174 chars (excluding the "content ..." text) which means that 174 bytes are "eating" the bandwidth every time the page is loaded.<br />
The styles also are written with consistency:</p>
<blockquote><p>
.t {background: url(dot.gif) 0 0 repeat-x; width: 20em}<br />
.b {background: url(dot.gif) 0 100% repeat-x}<br />
.l {background: url(dot.gif) 0 0 repeat-y}<br />
.r {background: url(dot.gif) 100% 0 repeat-y}<br />
.bl {background: url(bl.gif) 0 100% no-repeat}<br />
.br {background: url(br.gif) 100% 100% no-repeat}<br />
.tl {background: url(tl.gif) 0 0 no-repeat}<br />
.tr {background: url(tr.gif) 100% 0 no-repeat; padding:10px}
</p>
</blockquote>
<p>As a comparison with the previous method, this one uses <strong>five</strong> images for creating the effect. The good thing is that they are very small in size. </p>
<p>Until the <strong>'border-radius'</strong> CSS3 attribute will be implemented in web browsers' engine (you can read the specifications <a href="http://www.w3.org/TR/css3-background/">here</a> at paragraph 19), one of those methods presented above is good for creating containers with rounded corners.</p>
<p>Another method to get rounded corners is using JavaScript (ECMAScript), but this is another story <img src='http://www.lostresort.biz/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  .</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lostresort.biz%2Fblog%2F2008%2F07%2F24%2Fhow-to-create-container-with-rounded-corners%2F&amp;linkname=How%20to%20create%20containers%20with%20rounded%20corners"><img src="http://www.lostresort.biz/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.lostresort.biz/blog/2008/07/24/how-to-create-container-with-rounded-corners/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.954 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-26 13:08:02 -->
