<?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>AEXT.NET MAGAZINE &#187; Position</title>
	<atom:link href="http://aext.net/tag/position/feed/" rel="self" type="application/rss+xml" />
	<link>http://aext.net</link>
	<description>How to Create a Website</description>
	<lastBuildDate>Wed, 30 May 2012 05:03:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>CSS Absolute Positioning: Create A Fancy Link Block</title>
		<link>http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/</link>
		<comments>http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 23:02:39 +0000</pubDate>
		<dc:creator>Lief</dc:creator>
				<category><![CDATA[CSS & HTML]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[Absolute]]></category>
		<category><![CDATA[CSS Trick]]></category>
		<category><![CDATA[CSS tutorial]]></category>
		<category><![CDATA[Position]]></category>

		<guid isPermaLink="false">http://aext.net/?p=1218</guid>
		<description><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/" height="61" width="51" /></a></p>Absolute position is a feature of the CSS2 specification that is supported by all of web browsers. If you posit an element (an image, a table, or whatever) absolutely on your page, it will appear at the exact pixel you specify. In this tutorial, we will use some tricks to create a fancy link block that make our links more attractive. <a href="http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/" height="61" width="51" /></a></p><p>Absolute position is a feature of the CSS2 specification that is supported by all of web browsers. If you posit an element (an image, a table, or whatever) absolutely on your page, it will appear at the exact pixel you specify. In this tutorial, we will use some tricks to create a fancy link block that make our links more attractive.</p>
<p><span id="more-1218"></span></p>
<p>The final result of our work will be as same as the demo below. Check it out or download it.</p>
<div class="demo-download">
<ul>
<li><a href="http://aext.net/Downloads/Fancy Link Block.zip" target="_blank"><span class="downloadit">Download</span></a></li>
<li><a class="demoit" href="http://aext.net/example/css-fancy-link-block/">Demo</a></li>
</ul>
</div>
<h3>Write your link block elements in HTML code</h3>
<hr />
<p>We will create the HTML code first. Our link block will include: a link tag, a title of a link, link description, and an image.</p>
<p>Our HTML will be:</p>
<pre class="html">    <span style="color: #881280;">&lt;ul </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"subscribe"</span><span style="color: #881280;">&gt;</span>
      <span style="color: #881280;">&lt;li&gt;</span>
        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"linkblock"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://feeds2.feedburner.com/prlamnguyen"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Full RSS Feed"</span><span style="color: #881280;">&gt;&lt;/a&gt;</span>
        <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/feed.png"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Full RSS Feed"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #881280;">&lt;h4&gt;</span>Full RSS Feed<span style="color: #881280;">&lt;/h4&gt;</span>
        <span style="color: #881280;">&lt;p&gt;</span>Subscribe to our RSS Feed with full posts for your enjoyment.<span style="color: #881280;">&lt;/p&gt;</span>
      <span style="color: #881280;">&lt;/li&gt;</span>
      <span style="color: #881280;">&lt;li&gt;</span>
        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"linkblock"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://feedburner.google.com/fb/a/mailverify?uri=prlamnguyen&amp;amp;loc=en_U"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"E-Mail Delivery"</span><span style="color: #881280;">&gt;&lt;/a&gt;</span>
        <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/email.png"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"E-Mail Delivery"</span><span style="color: #881280;">&gt;</span>
        <span style="color: #881280;">&lt;h4&gt;</span>E-Mail Delivery<span style="color: #881280;">&lt;/h4&gt;</span>
        <span style="color: #881280;">&lt;p&gt;</span>We will send full blog posts to your inbox each time new posts plublished.<span style="color: #881280;">&lt;/p&gt;</span>
      <span style="color: #881280;">&lt;/li&gt;</span>
    <span style="color: #881280;">&lt;/ul&gt;</span></pre>
<p>Before applying CSS code, let&#8217;s see how our link block would be</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-1231" title="CSS Absolute Positioning Create A Fancy Link Block_2" src="http://aext.net/wp-contents/uploads/2009/10/CSS-Absolute-Positioning-Create-A-Fancy-Link-Block_21.png" alt="CSS Absolute Positioning Create A Fancy Link Block_2" width="500" height="252" /></div>
<h3>Applying CSS code</h3>
<hr />
<p>And this is our CSS code</p>
<p>For the List of links:</p>
<pre class="css">#subscribe {
    <span style="color: #88134f;">list-style</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">0px</span>;
}
#subscribe li {
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">10px</span>;
    <span style="color: #88134f;">position</span>: <span style="color: #9b4400;">relative</span>;
    <span style="color: #88134f;">margin-top</span>: <span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">margin-right</span>: <span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">margin-bottom</span>: <span style="color: #0000ff;">5px</span>;
    <span style="color: #88134f;">margin-left</span>: <span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">height</span>: <span style="color: #0000ff;">64px</span>;

}</pre>
<p>For the Title of the links:</p>
<pre class="css">#subscribe li h4 {
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">0 0 0 45px</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">24px</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">26px</span>;
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#333333</span>;
    <span style="color: #88134f;">font-family</span>: Helvetica, Arial, <span style="color: #9b4400;">sans-serif</span>;
    <span style="color: #88134f;">font-weight</span>: <span style="color: #9b4400;">bold</span>;
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">block</span>;
    <span style="color: #88134f;">clear</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">border</span>: <span style="color: #9b4400;">none</span>;
}</pre>
<p>We need to set margin left 45px for the title to display image in this space. Remember to set clear is none because the image will be displayed in the left side.</p>
<p>CSS for the description:</p>
<pre class="css">#subscribe li p {
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">0 0 0 45px</span>;
    <span style="color: #88134f;">font-family</span>: Helvetica, Arial, <span style="color: #9b4400;">sans-serif</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">13px</span>;
    <span style="color: #88134f;">letter-spacing</span>: -<span style="color: #0000ff;">0</span>.<span style="color: #0000ff;">02em</span>;
    <span style="color: #88134f;">clear</span>: <span style="color: #9b4400;">none</span>;
}</pre>
<p>The same as the title, you should remember to set clear is none.</p>
<p>Add CSS code for image:</p>
<pre class="css">#subscribe li img {
    <span style="color: #88134f;">float</span>: <span style="color: #9b4400;">left</span>;
    <span style="color: #88134f;">position</span>: <span style="color: #9b4400;">relative</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">0px</span>;
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">0px</span> <span style="color: #0000ff;">10px</span> <span style="color: #0000ff;">0px</span> <span style="color: #0000ff;">0px</span>;
}</pre>
<p>Now, we will review our HTML code. Because there is no element inside the link tag, we have to write CSS code that will make the link spreads whole block. If you want to do this, the only way is set position of this link as absolute and the placement should be set to 0 of all sides.</p>
<pre class="css">#subscribe li a.linkblock {
    <span style="color: #88134f;">background</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">border</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">top</span>: <span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">left</span>: <span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">right</span>: <span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">bottom</span>: <span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">width</span>: <span style="color: #0000ff;">100%</span>;
    <span style="color: #88134f;">height</span>: <span style="color: #0000ff;">100%</span>;
    <span style="color: #88134f;">position</span>: <span style="color: #9b4400;">absolute</span>;
    <span style="color: #88134f;">z-index</span>: <span style="color: #0000ff;">50</span>;
}</pre>
<p>Remember to set z-index for the link to make sure it is always on top. If not, the link block will not work.</p>
<p>The following CSS code is used for changing background of link block when the mouse is over.</p>
<pre class="css">#subscribe li:hover {
    <span style="color: #88134f;">background-color</span>: <span style="color: #760f15;">#F5F5F5</span>;
}</pre>
<p>It&#8217;s doesn&#8217;t work on IE6 if without using <a href="http://www.xs4all.nl/~peterned/csshover.html" rel="nofollow">whatever:hover</a>. However, I think the day when IE6 goes to hell almost come.</p>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
	</channel>
</rss>

