<?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>SEO Teknikleri ve Google SEO Makaleleri &#187; CSS Makaleleri</title>
	<atom:link href="http://www.sanalbilisim.net/seo/kategori/css-makaleleri/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sanalbilisim.net/seo</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 13:34:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A CSS styled table</title>
		<link>http://www.sanalbilisim.net/seo/css-makaleleri/a-css-styled-table.html</link>
		<comments>http://www.sanalbilisim.net/seo/css-makaleleri/a-css-styled-table.html#comments</comments>
		<pubDate>Mon, 17 Nov 2008 02:56:17 +0000</pubDate>
		<dc:creator>teori</dc:creator>
				<category><![CDATA[CSS Makaleleri]]></category>
		<category><![CDATA[A CSS styled table]]></category>
		<category><![CDATA[En iyi css makelesi]]></category>

		<guid isPermaLink="false">http://www.sanalbilisim.net/?p=394</guid>
		<description><![CDATA[Further to my article about the creation of a CSS calendar the thought crossed my mind to show you an example on how you can style a table using CSS. The data of tables can be boring so all the more reason that we need to attract attention to it and make it as pleasant [...]]]></description>
			<content:encoded><![CDATA[<p>Further to my article about the creation of a <a href="http://veerle.duoh.com/comments.php?id=312_0_2_0_C15">CSS calendar</a> the thought crossed my mind to show you an example on how you can <strong>style a table using CSS</strong>. The data of tables can be boring so all the more reason that we need to attract attention to it and make it as pleasant to read as possible. Presentation and design with <a href="http://www.456bereastreet.com/archive/200410/bring_on_the_tables/">some basic accessibility rules</a> in mind is the way to go.<span id="more-394"></span></p>
<p><img class="image" title="A CSS styled table" src="http://veerle.duoh.com/images/uploads/table_detail.gif" alt="A CSS styled table" width="450" height="120" /></p>
<p><strong>Advantages</strong><br />
Styling a table with CSS has mayor advantages since it separates the structural markup from presentation formatting. It offers extra flexibility on the way you present your table. You have the freedom to style each side of a table cell separately, isn&#8217;t that cool.</p>
<p>&lt;<strong>Getting started</strong><br />
First I create a simple draft in Photoshop. I experiment by trying out some color combinations, bullets, colors for the alternating rows etc. If you can&#8217;t decide on colors, then maybe <a href="http://veerle.duoh.com/comments.php?id=108_0_2_20_C8">these color calculators</a> can help you out.</p>
<p>In the next step I export these <strong>3 image files to style the background of the headers</strong>:</p>
<ul>
<li><a href="http://www.duoh.com/csstutorials/csstables/images/bg_header.jpg">bg_header.jpg</a></li>
<li><a href="http://www.duoh.com/csstutorials/csstables/images/bullet1.gif">bullet1.gif</a></li>
<li><a href="http://www.duoh.com/csstutorials/csstables/images/bullet2.gif">bullet2.gif</a></li>
</ul>
<p><strong>The structural markup</strong><br />
The coding in BBEdit is pretty simple. Here is some part of it:</p>
<pre>&lt;table id="mytable" cellspacing="0" summary="The technical
specifications of the Apple PowerMac G5 series"&gt;
&lt;caption&gt;Table 1: Power Mac G5 tech specs &lt;/caption&gt;
&lt;tr&gt;
  &lt;th scope="col" abbr="Configurations" class="nobg"&gt;Configurations&lt;/th&gt;
  &lt;th scope="col" abbr="Dual 1.8GHz"&gt;Dual 1.8GHz&lt;/th&gt;
  &lt;th scope="col" abbr="Dual 2GHz"&gt;Dual 2GHz&lt;/th&gt;
  &lt;th scope="col" abbr="Dual 2.5GHz"&gt;Dual 2GHz&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;th scope="row" class="spec"&gt;Model&lt;/th&gt;
  &lt;td&gt;M9454LL/A&lt;/td&gt;
  &lt;td&gt;M9455LL/A&lt;/td&gt;
  &lt;td&gt;M9457LL/A&lt;/td&gt;
&lt;/tr&gt;
...</pre>
<p>As you can see I&#8217;ve used the scope attribute to make sure that a my table makes sense in non-visual browsers. This attribute defines whether the header cell holds header information for a column (scope=&#8221;col&#8221;) or a row (scope=&#8221;row&#8221;).</p>
<p><strong>The CSS styles</strong><br />
For the headers at the top I&#8217;ve used a background image to make them extra visible, except for the one on the left. For this one I created a class (.nobg I have the habit to always use &#8216;bg&#8217; as an abbreviation of &#8216;background&#8217;). Here is how the CSS code looks:</p>
<pre>th {
	font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica,
	sans-serif;
	color: #6D929B;
	border-right: 1px solid #C1DAD7;
	border-bottom: 1px solid #C1DAD7;
	border-top: 1px solid #C1DAD7;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-align: left;
	padding: 6px 6px 6px 12px;
	background: #CAE8EA url(images/bg_header.jpg) no-repeat;
}

th.nobg {
	border-top: 0;
	border-left: 0;
	border-right: 1px solid #C1DAD7;
	background: none;
}</pre>
<p>The headers on the left that appear as rows (the specification headers) have alternating styles:</p>
<pre>th.spec {
	border-left: 1px solid #C1DAD7;
	border-top: 0;
	background: #fff url(images/bullet1.gif) no-repeat;
	font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica,
	sans-serif;
}

th.specalt {
	border-left: 1px solid #C1DAD7;
	border-top: 0;
	background: #f5fafa url(images/bullet2.gif) no-repeat;
	font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica,
	sans-serif;
	color: #B4AA9D;
}</pre>
<p>The table cells that hold the <a href="http://www.apple.com/powermac/specs.html">technical specifications of each Power Mac G5</a> also have alternating styles:</p>
<pre>td {
	border-right: 1px solid #C1DAD7;
	border-bottom: 1px solid #C1DAD7;
	background: #fff;
	padding: 6px 6px 6px 12px;
	color: #6D929B;
}

td.alt {
	background: #F5FAFA;
	color: #B4AA9D;
}</pre>
<p><a title="http://veerle.duoh.com/index.php/blog/comments/a_css_styled_table/" href="http://veerle.duoh.com/index.php/blog/comments/a_css_styled_table/" target="_blank">http://veerle.duoh.com/index.php/blog/comments/a_css_styled_table/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanalbilisim.net/seo/css-makaleleri/a-css-styled-table.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Turning a list into a navigation bar</title>
		<link>http://www.sanalbilisim.net/seo/css-makaleleri/turning-a-list-into-a-navigation-bar.html</link>
		<comments>http://www.sanalbilisim.net/seo/css-makaleleri/turning-a-list-into-a-navigation-bar.html#comments</comments>
		<pubDate>Mon, 17 Nov 2008 02:47:11 +0000</pubDate>
		<dc:creator>teori</dc:creator>
				<category><![CDATA[CSS Makaleleri]]></category>
		<category><![CDATA[En iyi css makelesi]]></category>
		<category><![CDATA[Turning a list into a navigation bar]]></category>

		<guid isPermaLink="false">http://www.sanalbilisim.net/?p=389</guid>
		<description><![CDATA[Turning a list into a navigation bar I’ve received a couple of requests for a description of how I created the navigation bar that is currently used on this site. The CSS used isn’t all that advanced, and I hadn’t really thought about describing it in detail, but after being asked about it I decided [...]]]></description>
			<content:encoded><![CDATA[<p>Turning a list into a navigation bar<br />
I’ve received a couple of requests for a description of how I created the navigation bar that is currently used on this site. The CSS used isn’t all that advanced, and I hadn’t really thought about describing it in detail, but after being asked about it I decided to do a write-up.<span id="more-389"></span></p>
<p>I’ve cleaned up the HTML and CSS slightly, so if you compare this to what is actually used on the site there will be some small differences. In case I have redesigned by the time you read this, check out <a href="http://www.456bereastreet.com/lab/ul_navbar/step11/">the finished example</a> to see what the menu looked like at the time of this writing.<br />
The HTML<br />
The markup is very simple. It’s an unordered list, with each link in a separate list item:</p>
<ol class="code">
<li><code>&lt;ul id="nav"&gt;</code></li>
<li class="tab1"><code>&lt;li id="nav-home"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab1"><code>&lt;li id="nav-about"&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab1"><code>&lt;li id="nav-archive"&gt;&lt;a href="#"&gt;Archive&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab1"><code>&lt;li id="nav-lab"&gt;&lt;a href="#"&gt;Lab&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab1"><code>&lt;li id="nav-reviews"&gt;&lt;a href="#"&gt;Reviews&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab1"><code>&lt;li id="nav-contact"&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;</code></li>
<li><code>&lt;/ul&gt;</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step01/">View Step 1</a>.</p>
<p>Why use a list? Because a navigation bar, or menu, is a list of links. The best (most semantic) way of marking up a list of links is to use a list element. Using a list also has the benefit of providing structure even if CSS is disabled.</p>
<p>At this stage, with no CSS applied, the list will look like any old (normally bulleted) list, styled only by the browser’s defaults.</p>
<p>I’ve given <code>id</code> attributes to the <code>ul</code> and <code>li</code> elements. The <code>id</code> attribute for the <code>ul</code> element is used by the CSS rules that style the entire list. The <code>li</code> elements have different <code>id</code> values to enable the use of CSS to highlight the currently selected link. This is done by specifying an <code>id</code> for the <code>body</code> element. More on that later.</p>
<h2>The CSS</h2>
<p>I’ll describe the CSS I’ve used to style the list in a step-by-step fashion.</p>
<p>First of all, I set the margins and padding of the list and list items to zero, and tell the list items to be displayed inline:</p>
<ol class="code">
<li><code>#nav {</code></li>
<li class="tab1"><code>margin:0;</code></li>
<li class="tab1"><code>padding:0;</code></li>
<li><code>}</code></li>
<li><code>#nav li {</code></li>
<li class="tab1"><code>display:inline;</code></li>
<li class="tab1"><code>padding:0;</code></li>
<li class="tab1"><code>margin:0;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step02/">View Step 2</a></p>
<p>This will make all the links display one after another on the same line, as if the list wasn’t there. It will also remove the list bullets, since they are only displayed when <code>display:list-item</code> (the default display mode for list items) is used. Some browsers are said to incorrectly display the list bullets even though <code>display:inline</code> has been applied to the list items. I haven’t seen this happen in any of the browsers I tested in, but if you want to make sure that no browsers display list bullets, you can add <code>list-style-type:none</code> to the rule for <code>#nav</code>.</p>
<p>Next, it’s time to start styling the menu tabs. I do this by adding styles to the links, not to the list items. The reason for that is that I want the entire area of each tab to be clickable. First a bit of colour to make the changes more obvious:</p>
<ol class="code">
<li><code>#nav a:link,</code></li>
<li><code>#nav a:visited {</code></li>
<li class="tab1"><code>color:#000;</code></li>
<li class="tab1"><code>background:#b2b580;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step03/">View Step 3</a>.</p>
<p>Note that I’m styling the normal and visited states of the links to look the same. the next step is to add a bit of padding to the links:</p>
<ol class="code">
<li><code>#nav a:link,</code></li>
<li><code>#nav a:visited {</code></li>
<li class="tab1"><code>color:#000;</code></li>
<li class="tab1"><code>background:#b2b580;</code></li>
<li class="tab1 changed"><code>padding:20px 40px 4px 10px;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step04/">View Step 4</a>.</p>
<p>That’s a bit better. But there is a potential problem that isn’t visible here. Since the links are inline elements, their vertical padding will not add to their line height. It’s easier to see this if the <code>ul</code> element has a background, so I’ll add a background colour and a background image:</p>
<ol class="code">
<li><code>#nav {</code></li>
<li class="tab1"><code>margin:0;</code></li>
<li class="tab1"><code>padding:0;</code></li>
<li class="tab1 changed"><code>background:#808259 url(nav_bg.jpg) 0 0 repeat-x;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step05/">View Step 5</a>.</p>
<p>Oops. Now the links are sticking out of the list element. To fix this, I’ve turned the links into block boxes by floating them to the left. I’ve also set their width to <code>auto</code>, to make them shrink to fit their content:</p>
<ol class="code">
<li><code>#nav a:link,</code></li>
<li><code>#nav a:visited {</code></li>
<li class="tab1"><code>color:#000;</code></li>
<li class="tab1"><code>background:#b2b580;</code></li>
<li class="tab1"><code>padding:20px 40px 4px 10px;</code></li>
<li class="tab1 changed"><code>float:left;</code></li>
<li class="tab1 changed"><code>width:auto;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step06/">View Step 6</a>.</p>
<p>Adding <code>display:block</code> to the CSS rule for the links would also have made them block boxes, but since a floated element automatically generates a block box, that isn’t necessary.</p>
<p>As you may have noticed, the background disappeared when the links were floated. That’s because floated elements are taken out of the document flow, which causes the <code>ul</code> element containing them to have zero height. Thus, the background is there, but it isn’t visible. To make the <code>ul</code> enclose the links, I’ve floated that too. I’ve also set its width to 100%, making it span the whole window (except for the padding I’ve given the <code>body</code> element in this example):</p>
<ol class="code">
<li><code>#nav {</code></li>
<li class="tab1"><code>margin:0;</code></li>
<li class="tab1"><code>padding:0;</code></li>
<li class="tab1"><code>background:#808259 url(nav_bg.jpg) 0 0 repeat-x;</code></li>
<li class="tab1 changed"><code>float:left;</code></li>
<li class="tab1 changed"><code>width:100%;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step07/">View Step 7</a>.</p>
<p>To visually separate the links from each other, I’ve added a right border to the links. Then, to give the first link a left border as well, I’ve used a <code>:first-child</code> pseudo-class to apply a rule only to the link in the very first list item. I’ve also added top and bottom borders to the <code>ul</code> element:</p>
<ol class="code">
<li><code>#nav {</code></li>
<li class="tab1"><code>margin:0;</code></li>
<li class="tab1"><code>padding:0;</code></li>
<li class="tab1"><code>background:#808259 url(nav_bg.jpg) 0 0 repeat-x;</code></li>
<li class="tab1"><code>float:left;</code></li>
<li class="tab1"><code>width:100%;</code></li>
<li class="tab1 changed"><code>border:1px solid #42432d;</code></li>
<li class="tab1 changed"><code>border-width:1px 0;</code></li>
<li><code>}</code></li>
<li><code>#nav a:link,</code></li>
<li><code>#nav a:visited {</code></li>
<li class="tab1"><code>color:#000;</code></li>
<li class="tab1"><code>background:#b2b580;</code></li>
<li class="tab1"><code>padding:20px 40px 4px 10px;</code></li>
<li class="tab1"><code>float:left;</code></li>
<li class="tab1"><code>width:auto;</code></li>
<li class="tab1 changed"><code>border-right:1px solid #42432d;</code></li>
<li><code>}</code></li>
<li class="changed"><code>#nav li:first-child a {</code></li>
<li class="tab1 changed"><code>border-left:1px solid #42432d;</code></li>
<li class="changed"><code>}</code></li>
</ol>
<p>The <code>:first-child</code> pseudo-class is not recognised by Internet Explorer for Windows, so the first link won’t have a left border in that browser. In this case, that isn’t a major problem, so I’ve left it like that. If it’s really important to you, you’ll need to add a class to the first list item (or the link in it), and then use that to give the link a left border.</p>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step08/">View Step 8</a>.</p>
<p>Next I’ve changed the way the link text is displayed by removing the underlining, making the text bold, specifying font size, line-height, and a different font family, making the text uppercase, and adding a little bit of drop shadow. The drop shadow is created with the <code>text-shadow</code> property, a CSS3 property that is currently only supported by Safari and OmniWeb:</p>
<ol class="code">
<li><code>#nav a:link,</code></li>
<li><code>#nav a:visited {</code></li>
<li class="tab1"><code>color:#000;</code></li>
<li class="tab1"><code>background:#b2b580;</code></li>
<li class="tab1"><code>padding:20px 40px 4px 10px;</code></li>
<li class="tab1"><code>float:left;</code></li>
<li class="tab1"><code>width:auto;</code></li>
<li class="tab1"><code>border-right:1px solid #42432d;</code></li>
<li class="tab1 changed"><code>text-decoration:none;</code></li>
<li class="tab1 changed"><code>font:bold 1em/1em Arial, Helvetica, sans-serif;</code></li>
<li class="tab1 changed"><code>text-transform:uppercase;</code></li>
<li class="tab1 changed"><code>text-shadow: 2px 2px 2px #555;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step09/">View Step 9</a>.</p>
<p>To give some visual feedback when the links are hovered over, I’ve given their <code>:hover</code> state different text and background colours:</p>
<ol class="code">
<li><code>#nav a:hover {</code></li>
<li class="tab1"><code>color:#fff;</code></li>
<li class="tab1"><code>background:#727454;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step10/">View Step 10</a>.</p>
<p>In the final step, I’ve added rules that will make the selected link look different than the others, to show visitors where they are on the site.</p>
<p>In case you haven’t seen an example of specifying an <code>id</code> attribute for the <code>body</code> element to style the “current” navigation tab differently before, that’s what the first two rules do. In the examples linked to from this article, I’ve set <code>id</code> of the <code>body</code> element to “<code>home</code>”, which makes the “Home” tab the current one. Changing it to “<code>about</code>” would make the “About” tab the current one, and so on.</p>
<p>I’ve also made the selected link stay the same when it’s hovered over. It can be argued that the current menu item should not be a link at all. In this case, I’ve chosen to leave the link in the markup and use CSS to remove the visual feedback on hover.</p>
<p>To give some visual feedback when you click on one of the links, I’ve given the <code>:active</code> state of the links the same styling as the selected link:</p>
<ol class="code">
<li><code>#home #nav-home a,</code></li>
<li><code>#about #nav-about a,</code></li>
<li><code>#archive #nav-archive a,</code></li>
<li><code>#lab #nav-lab a,</code></li>
<li><code>#reviews #nav-reviews a,</code></li>
<li><code>#contact #nav-contact a {</code></li>
<li class="tab1"><code>background:#e35a00;</code></li>
<li class="tab1"><code>color:#fff;</code></li>
<li class="tab1"><code>text-shadow:none;</code></li>
<li><code>}</code></li>
<li><code>#home #nav-home a:hover,</code></li>
<li><code>#about #nav-about a:hover,</code></li>
<li><code>#archive #nav-archive a:hover,</code></li>
<li><code>#lab #nav-lab a:hover,</code></li>
<li><code>#reviews #nav-reviews a:hover,</code></li>
<li><code>#contact #nav-contact a:hover {</code></li>
<li class="tab1"><code>background:#e35a00;</code></li>
<li><code>}</code></li>
<li><code>#nav a:active {</code></li>
<li class="tab1"><code>background:#e35a00;</code></li>
<li class="tab1"><code>color:#fff;</code></li>
<li><code>}</code></li>
</ol>
<p><a href="http://www.456bereastreet.com/lab/ul_navbar/step11/">View Step 11</a>, the finished navigation menu.</p>
<p>That’s it. This step-by-step tutorial makes the whole thing look more advanced than it really is. View source on the final example to see the complete set of CSS rules. By the way, with a couple of small exceptions (the left border on the first link, and the text shadow), this works in just about any browser, even Internet Explorer (version 5 or newer).</p>
<p>I hope you’ve been able to follow along well enough to be able to create your own navigation menu. The styling possibilities are almost endless.</p>
<p>kaynak: <a href="http://www.456bereastreet.com/archive/200501/turning_a_list_into_a_navigation_bar/">http://www.456bereastreet.com/archive/200501/turning_a_list_into_a_navigation_bar/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanalbilisim.net/seo/css-makaleleri/turning-a-list-into-a-navigation-bar.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Clear Floats Without Structural Markup</title>
		<link>http://www.sanalbilisim.net/seo/css-makaleleri/how-to-clear-floats-without-structural-markup.html</link>
		<comments>http://www.sanalbilisim.net/seo/css-makaleleri/how-to-clear-floats-without-structural-markup.html#comments</comments>
		<pubDate>Mon, 17 Nov 2008 02:42:35 +0000</pubDate>
		<dc:creator>teori</dc:creator>
				<category><![CDATA[CSS Makaleleri]]></category>
		<category><![CDATA[En iyi css makalesi]]></category>
		<category><![CDATA[How To Clear]]></category>
		<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://www.sanalbilisim.net/?p=386</guid>
		<description><![CDATA[
