<?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>Creotiv lives here &#187; css</title>
	<atom:link href="http://creotiv.in.ua/tags/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://creotiv.in.ua</link>
	<description>Andrey Nikishaev Blog</description>
	<lastBuildDate>Sat, 04 Sep 2010 08:52:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Наследование в CSS</title>
		<link>http://creotiv.in.ua/%d0%bd%d0%b0%d1%81%d0%bb%d0%b5%d0%b4%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b2-css/</link>
		<comments>http://creotiv.in.ua/%d0%bd%d0%b0%d1%81%d0%bb%d0%b5%d0%b4%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b2-css/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 12:42:08 +0000</pubDate>
		<dc:creator>Андрей Никишаев</dc:creator>
				<category><![CDATA[Дизайн и верстка]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[наследование]]></category>

		<guid isPermaLink="false">http://creotiv.in.ua/?p=1173</guid>
		<description><![CDATA[Верстаю сча макет сервиса.. и задумался о том как хорошо было бы иметь наследование в css. Я говорю сейчас не наследовании параметров у parent'а, а о том наследовании когда мы сами можем указать от чего наследуется елемент.]]></description>
			<content:encoded><![CDATA[<p>Верстаю сча макет сервиса.. и задумался о том как хорошо было бы иметь наследование в css. Я говорю сейчас не наследовании параметров у parent&#8217;а, а о том наследовании когда мы сами можем указать от чего наследуется елемент.</p>
<p>допустим есть запись:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#body</span> ul li <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:-moz-inline-</span>stack<span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/*Needed Firefox*/</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:inline-</span>block<span style="color: #00AA00;">;</span>       <span style="color: #808080; font-style: italic;">/*Don't used in IE and Firefox*/</span>
    _overflow<span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>           <span style="color: #808080; font-style: italic;">/*Fix for IE6*/</span>
    zoom<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>                     <span style="color: #808080; font-style: italic;">/*Turn on hasLayout*/</span>
    <span style="color: #00AA00;">*</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>            <span style="color: #808080; font-style: italic;">/*With hasLayout true display:inline behave like display:inline-block*/</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#menu</span> ul li <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:-moz-inline-</span>stack<span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/*Needed Firefox*/</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:inline-</span>block<span style="color: #00AA00;">;</span>       <span style="color: #808080; font-style: italic;">/*Don't used in IE and Firefox*/</span>
    _overflow<span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>           <span style="color: #808080; font-style: italic;">/*Fix for IE6*/</span>
    zoom<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>                     <span style="color: #808080; font-style: italic;">/*Turn on hasLayout*/</span>
    <span style="color: #00AA00;">*</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>            <span style="color: #808080; font-style: italic;">/*With hasLayout true display:inline behave like display:inline-block*/</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Как видим код дублируется и это крайне непритно и не функционально. А так хочется иметь что то типа:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@display_inline {</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:-moz-inline-</span>stack<span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/*Needed Firefox*/</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:inline-</span>block<span style="color: #00AA00;">;</span>       <span style="color: #808080; font-style: italic;">/*Don't used in IE and Firefox*/</span>
    _overflow<span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>           <span style="color: #808080; font-style: italic;">/*Fix for IE6*/</span>
    zoom<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>                     <span style="color: #808080; font-style: italic;">/*Turn on hasLayout*/</span>
    <span style="color: #00AA00;">*</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>            <span style="color: #808080; font-style: italic;">/*With hasLayout true display:inline behave like display:inline-block*/</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#body</span> ul li <span style="color: #00AA00;">&#123;</span>
     <span style="color: #a1a100;">@inherit(display_inline)</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#menu</span> ul li <span style="color: #00AA00;">&#123;</span>
     <span style="color: #a1a100;">@inherit(display_inline)</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://creotiv.in.ua/%d0%bd%d0%b0%d1%81%d0%bb%d0%b5%d0%b4%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b2-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some css hacks</title>
		<link>http://creotiv.in.ua/some-css-hacks/</link>
		<comments>http://creotiv.in.ua/some-css-hacks/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 05:56:15 +0000</pubDate>
		<dc:creator>Андрей Никишаев</dc:creator>
				<category><![CDATA[Дизайн и верстка]]></category>
		<category><![CDATA[crossbrowser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[markup]]></category>

		<guid isPermaLink="false">http://creotiv.in.ua/?p=1152</guid>
		<description><![CDATA[Some css hacks for cross browser markup that i often use]]></description>
			<content:encoded><![CDATA[<p>Some css hacks for cross browser markup that i often use<br />
<span id="more-1152"></span></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Stack footer to the bottom of page ----------------------------------------*/</span>
<span style="color: #808080; font-style: italic;">/*
&lt;div id=&quot;container&quot;&gt;&lt;/div&gt;
*/</span>
&nbsp;
html<span style="color: #00AA00;">,</span>
body <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#ff0</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#body</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>   <span style="color: #808080; font-style: italic;">/* Height of the footer */</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>   <span style="color: #808080; font-style: italic;">/* Height of the footer */</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#6cf</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*&lt;!--[if lte IE 7]&gt;*/</span>
<span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*&lt;![endif]--&gt;*/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Vertical align ----------------------------------------------------------- */</span>
<span style="color: #808080; font-style: italic;">/*
&lt;div id=&quot;container&quot;&gt;
&lt;div id=&quot;dynamic_height_giver&quot;&gt;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz
&nbsp;
        foo bar baz&lt;/div&gt;
&lt;div id=&quot;middle&quot;&gt;
&lt;div id=&quot;ie_helper&quot;&gt;
&nbsp;
CAN HAS VERTICAL CENTER?&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
*/</span>
&nbsp;
<span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> table<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
    <span style="color: #cc00cc;">#dynamic_height_giver</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">table-cell</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#0d0</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
&nbsp;
    <span style="color: #cc00cc;">#middle</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">table-cell</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">middle</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*&lt;!--[if lte IE 7]&gt;*/</span>
    <span style="color: #cc00cc;">#dynamic_height_giver</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
    <span style="color: #cc00cc;">#middle</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
    <span style="color: #cc00cc;">#ie_helper</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-<span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
    <span style="color: #cc00cc;">#middle</span><span style="color: #00AA00;">,</span>
    <span style="color: #cc00cc;">#ie_helper</span><span style="color: #00AA00;">,</span>
    <span style="color: #cc00cc;">#container</span> p <span style="color: #00AA00;">&#123;</span>
        zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
    <span style="color: #00AA00;">*</span> html <span style="color: #cc00cc;">#dynamic_height_giver</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-3px</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*&lt;![endif]--&gt;*/</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Crossbrowser inline-block ------------------------------------------------ */</span>
<span style="color: #6666ff;">.inline-block_v1</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">250px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> -moz-inline-stack<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
    zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">*</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
    _height<span style="color: #00AA00;">:</span> <span style="color: #933;">250px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.inline-block_v2</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:-moz-inline-</span>stack<span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/*Needed Firefox*/</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:inline-</span>block<span style="color: #00AA00;">;</span>       <span style="color: #808080; font-style: italic;">/*Don't used in IE and Firefox*/</span>
    _overflow<span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>           <span style="color: #808080; font-style: italic;">/*Fix for IE6*/</span>
    zoom<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>                     <span style="color: #808080; font-style: italic;">/*Turn on hasLayout*/</span>
    <span style="color: #00AA00;">*</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>            <span style="color: #808080; font-style: italic;">/*With hasLayout true display:inline behave like display:inline-block*/</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Wrapping Long URLs and Text Content -------------------------------------- */</span>
pre <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> pre<span style="color: #00AA00;">;</span>           <span style="color: #808080; font-style: italic;">/* CSS 2.0 */</span>
	<span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> pre-wrap<span style="color: #00AA00;">;</span>      <span style="color: #808080; font-style: italic;">/* CSS 2.1 */</span>
	<span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> pre-line<span style="color: #00AA00;">;</span>      <span style="color: #808080; font-style: italic;">/* CSS 3.0 */</span>
	<span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> -pre-wrap<span style="color: #00AA00;">;</span>     <span style="color: #808080; font-style: italic;">/* Opera 4-6 */</span>
	<span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> -o-pre-wrap<span style="color: #00AA00;">;</span>   <span style="color: #808080; font-style: italic;">/* Opera 7 */</span>
	<span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> -moz-pre-wrap<span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Mozilla */</span>
	<span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> -hp-pre-wrap<span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* HP Printers */</span>
	word-wrap<span style="color: #00AA00;">:</span> break-word<span style="color: #00AA00;">;</span>      <span style="color: #808080; font-style: italic;">/* IE 5+ */</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Centering absolute positioned elements ----------------------------------- */</span>
<span style="color: #cc00cc;">#outer</span>
<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">40</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">120px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#c00</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#inner</span>
<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-50px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#00c</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* clearfix ----------------------------------------------------------------- */</span>
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">*</span> html <span style="color: #6666ff;">.clearfix</span>             <span style="color: #00AA00;">&#123;</span> zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span> <span style="color: #808080; font-style: italic;">/* IE6 */</span>
<span style="color: #00AA00;">*</span><span style="color: #3333ff;">:first-child</span><span style="color: #00AA00;">+</span>html <span style="color: #6666ff;">.clearfix</span> <span style="color: #00AA00;">&#123;</span> zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span> <span style="color: #808080; font-style: italic;">/* IE7 */</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://creotiv.in.ua/some-css-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Дизайн CSS</title>
		<link>http://creotiv.in.ua/%d0%b4%d0%b8%d0%b7%d0%b0%d0%b9%d0%bd-css/</link>
		<comments>http://creotiv.in.ua/%d0%b4%d0%b8%d0%b7%d0%b0%d0%b9%d0%bd-css/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 15:25:44 +0000</pubDate>
		<dc:creator>Андрей Никишаев</dc:creator>
				<category><![CDATA[Дизайн и верстка]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[дизайн]]></category>

		<guid isPermaLink="false">http://creotiv.in.ua/?p=760</guid>
		<description><![CDATA[Сегодня вот перебирал css и родилась идея верстать его в соответствии с представлением в шаблоне. Тоесть в том же порядке с той же вложенностью что и блоки html.]]></description>
			<content:encoded><![CDATA[<p>Сегодня вот перебирал css и родилась идея верстать его в соответствии с представлением в шаблоне. Тоесть в том же порядке с той же вложенностью что и блоки html.</p>
<p>Довольно удобно. По крайней мере искать стили нужных блоков стало куда легче.</p>
<p><span id="more-760"></span></p>
<p>Вот приблезительно как это выглядит:</p>
<blockquote><pre><span style="font-size:8px;color:#000;">
/* Layouts (Placed within template order and incapsulation)
****************************************************************/
body {
height:100%;
line-height: 1;
color:#383838;
text-align:left;
background: url(img/bg.png) repeat;
}
	#container {
	background: url(img/bgTop2.png) repeat-x;
	height:100%;
	}
		#page {
		height:100%;
		margin: 0 auto;
		width:970px;
		}
			#head {
			height:140px;
			margin: 0 9px;
			background: transparent url(img/endoscope.jpg) no-repeat top left;
			}
				#top-menu {
				height:55px;
				text-align:right;
				padding-right:25px;
				}
				/*top-menu content**********************************/
						#top-menu a {
						text-decoration:none;
						font-family:Verdana, Arial;
						font-size:12px;
						color:#fff;
						overflow:hidden;
						cursor:pointer;
						display:block;
						}
						#top-menu div{
						width:116px;
						height:22px;
						background: transparent url(img/topBut.png) no-repeat 0px -25px;
						text-align:center;
						padding-top:7px;
						margin-right:5px;
						float:right;
						cursor:default;
						}
						#top-menu div:hover, #top-menu div.active {
						width:116px;
						height:22px;
						background: transparent url(img/topButActive.png) no-repeat 0px 0px;
						text-align:center;
						padding-top:32px;
						margin-right:5px;
						float:right;
						cursor:default;
						}
				/***********************************/
				#logo {
				margin-top:40px;
				width:600px;
				float:left;
				height:26px;
				overflow:hidden;
				}
				/*logo content**********************************/
						#logo a {
						text-decoration:none;
						}
						#logo img {
						border:0px;
						}
						#logo h1 {
						text-indent:-9999px;
						}
				/***********************************/
				#searchTop {
				margin-top:40px;
				margin-right:6px;
				float:right;
				width:300px;
				}
				/*searchTop content**********************************/
						#searchTop .field {
						float:left;
						background: url(img/searchField.jpg) no-repeat;
						}
						#searchTop input.hiddenField{
						background-color: transparent;
						border: solid 0px #FFF;
						padding:3px 5px 0 5px;
						height:23px;
						width:210px;
						color:#fff;
						}
						#searchTop input.hiddenField:focus{
						border: solid 0px #FFF;
						}
						#searchTop .button {
						float:right;
						}
				/***********************************/
			#shadow {
			background: transparent url(img/sh.png) repeat-y top left;
			height:100%;
			}
				#body {
				margin: 0 9px;
				background: #fff;
				padding:6px;
				float:left;
				height:100%;
				}
					#topBar  {
					width:940px;
					height:29px;
					background: transparent url(img/topBar.png) no-repeat top left;
					}
						/*topBar content**********************************/
								#topBarActions {
								float:right;
								color:#fff;
								margin: 10px 15px 0px 0px;
								font-size:10px;
								font-family:Verdana, Arial;
								}
								#topBarActions a{
								color:#ffffff;
								text-decoration:none;
								}
								#topBarActions a:hover{
								color:#ffffff;
								border-bottom:#fff 1px solid;
								}
								#topBarLocation {
								float:left;
								color:#fff;
								margin: 8px 0px 0px 35px;
								font-size:12px;
								font-family:Verdana, Arial;
								cursor:default;
								}
						/***********************************/
					#wrap {
					width:100%;
					height:100%;
					/*float:left;*/
					}
					#menuLeft {
					margin-top: 6px;
					width:246px;
					clear:none;
					float:left;
					height:100%;
					}
					#content {
					margin: 6px 0px 0px 6px;
					clear:none;
					float:left;
					width:688px;
					height:100%;
					background:#ccc;
					}
					#articleBg {
					background:transparent url(img/articleBodyBg.png) repeat-y;
					height:100%;
					}
						#articleTop{
						background:transparent url(img/articleTopBg.png) no-repeat;
						height:100%;
						}
							#articleTop #article{
							font-family:Times New Roman;
							font-size:16px;
							padding:30px 40px 30px 50px;
							text-align:justify;
							line-height:18px;
							/*height:600px;
							display:list-item;*/
							width:588px;
							height:100%;
							}

					#articleOnlyTop {
					background:transparent url(img/articleOnlyTopBg.png) no-repeat;
					height:100%;
					width:940px;
					}
						#articleOnlyTop #article{
						font-family:Times New Roman;
						font-size:16px;
						padding:30px 50px 30px 50px;
						text-align:justify;
						line-height:18px;
						width:840px;
						height:100%;
						}</span></pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://creotiv.in.ua/%d0%b4%d0%b8%d0%b7%d0%b0%d0%b9%d0%bd-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Верстка сложных растягивающихся кнопок</title>
		<link>http://creotiv.in.ua/%d0%b2%d0%b5%d1%80%d1%81%d1%82%d0%ba%d0%b0-%d1%81%d0%bb%d0%be%d0%b6%d0%bd%d1%8b%d1%85-%d0%ba%d0%bd%d0%be%d0%bf%d0%be%d0%ba/</link>
		<comments>http://creotiv.in.ua/%d0%b2%d0%b5%d1%80%d1%81%d1%82%d0%ba%d0%b0-%d1%81%d0%bb%d0%be%d0%b6%d0%bd%d1%8b%d1%85-%d0%ba%d0%bd%d0%be%d0%bf%d0%be%d0%ba/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 12:50:24 +0000</pubDate>
		<dc:creator>Андрей Никишаев</dc:creator>
				<category><![CDATA[Дизайн и верстка]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[верстка]]></category>
		<category><![CDATA[кнопка]]></category>

		<guid isPermaLink="false">http://creotiv.in.ua/?p=703</guid>
		<description><![CDATA[С дизайном одного сайта встала задача нарисовать красивые кнопочки для меню(в примере не они). При этом длинна текста в кнопочке не ограничивается а посему нужно, что бы она тянулась вертикально на столько на сколько нужно.
 Так как нам нужна красивая кнопочка, то одним слоем картинки никак не обойтись. Нужно как минимум 4 слоя. Три для [...]]]></description>
			<content:encoded><![CDATA[<p>С дизайном одного сайта встала задача нарисовать красивые кнопочки для меню(в примере не они). При этом длинна текста в кнопочке не ограничивается а посему нужно, что бы она тянулась вертикально на столько на сколько нужно.</p>
<p><span id="more-703"></span> Так как нам нужна красивая кнопочка, то одним слоем картинки никак не обойтись. Нужно как минимум 4 слоя. Три для картинок и один для текста.<br />
Суть всего этого такова:<br />
1-й слой &#8211; это повторяющийся бекграунд.<br />
2-й слой &#8211; это прозрачная картинка которая привязывается к верхушке кнопки.<br />
3-й слой &#8211; это прозрачная картинка которая привязывается к низу кнопки.<br />
4-й слой &#8211; это собственно текст кнопки.<br />
<strong>Проблемы:</strong></p>
<p><span style="text-decoration: underline;">Проблема первая</span><br />
Все как всегда упирается в IE. Так уж вышло что псевдокласс :hover (который кстати присутствует с CSS 1.0) работает только на элементе &lt;a&gt; и на другие не распространяется. По этому, что бы оживить кнопку при наведении мышки мы оборачиваем ее в елемент &lt;a&gt;.</p>
<p>Когда наша кнопочка не выбрана она имеет класс &#8220;none&#8221; иначе &#8220;active&#8221;.</p>
<p><span style="text-decoration: underline;">Проблема вторая</span><br />
И снова IE. В отличии от Firefox и Chrome, в IE padding не увеличивает размер div&#8217;a.  По этому в CSS добавил reference-хак который для Firefox и Chrome сжимает длинну кнопки на 30px, которые мы добавили используя padding, а для IE оставляет все как есть.</p>
<p>Посути все очень просто) Главное не забывать, что где-то там во тьме всегда существует злой IE, который так и наровит выкинуть что-то эдакое.</p>
<p><strong>P.S. </strong>Не забываем подгружать картинки для кнопочек до их инициализации.</p>
<p>Код кнопочки:</p>
<div class="html4strict" style="padding:20px;font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><span style="color: #009900;">&lt;<a style="color: #000060;" href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span></p>
<p>.menuBg {</p>
<p>background: url(http://creotiv.in.ua/wp-content/uploads/2009/08/menuBg.gif) repeat;</p>
<p>width:246px;</p>
<p>height:auto;</p>
<p>overflow:visible;</p>
<p>cursor:pointer;</p>
<p>}</p>
<p>a.none .menuTop {</p>
<p>background: url(http://creotiv.in.ua/wp-content/uploads/2009/08/menuTop.png) no-repeat top right;</p>
<p>width:246px;</p>
<p>height:auto;</p>
<p>}</p>
<p>a.none .menuBottom {</p>
<p>background: url(http://creotiv.in.ua/wp-content/uploads/2009/08/menuBottom.png) no-repeat bottom left;</p>
<p>width:100%;</p>
<p>height:auto;</p>
<p>}</p>
<p>a.none .menuContent {</p>
<p>width:246px;</p>
<p>height:auto;</p>
<p>color:#ff0000;</p>
<p>font-size:12px;</p>
<p>font-family:Verdana;</p>
<p>padding: 7 0 7 30;</p>
<p>}</p>
<p>body&gt;a.none .menuContent {</p>
<p>width:216px;</p>
<p>}</p>
<p>.menuContent .margin {</p>
<p>}</p>
<p>a {</p>
<p>text-decoration:none;</p>
<p>}</p>
<p>a.active .menuTop, a.none:hover .menuTop {</p>
<p>background: url(http://creotiv.in.ua/wp-content/uploads/2009/08/menuTopOver.png) no-repeat top right;</p>
<p>width:246px;</p>
<p>height:auto;</p>
<p>}</p>
<p>a.active .menuBottom, a.none:hover .menuBottom {</p>
<p>background: url(http://creotiv.in.ua/wp-content/uploads/2009/08/menuBottomOver.png) no-repeat bottom left;</p>
<p>width:246px;</p>
<p>height:auto;</p>
<p>}</p>
<p>a.active .menuContent, a.none:hover .menuContent {</p>
<p>width:246px;</p>
<p>height:auto;</p>
<p>color:#ffffff;</p>
<p>font-size:12px;</p>
<p>font-family:Verdana;</p>
<p>padding: 7 0 7 30;</p>
<p>}</p>
<p>body&gt;a.active .menuContent, body&gt;a.none:hover .menuContent {</p>
<p>width:216px;</p>
<p>}</p>
<p><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a style="color: #000060;" href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span></p>
<p><span style="color: #009900;">&lt;<a style="color: #000060;" href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;none&#8221;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;#&#8221;</span>&gt;</span></p>
<p><span style="color: #009900;">&lt;<a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span>menuBg&gt;</span></p>
<p><span style="color: #009900;">&lt;<a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span>menuTop&gt;</span></p>
<p><span style="color: #009900;">&lt;<a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span>menuBottom&gt;</span></p>
<p><span style="color: #009900;">&lt;<a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span>menuContent&gt;</span></p>
<p>Hello, i’m the biggest button that yuo ever seen!</p>
<p><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></p>
<p><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></p>
<p><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></p>
<p><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a style="color: #000060;" href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></p>
<p><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a style="color: #000060;" href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span></div>
<p><a href="http://creotiv.in.ua/wp-content/uploads/2009/08/index.html">Пример работы</a></p>
]]></content:encoded>
			<wfw:commentRss>http://creotiv.in.ua/%d0%b2%d0%b5%d1%80%d1%81%d1%82%d0%ba%d0%b0-%d1%81%d0%bb%d0%be%d0%b6%d0%bd%d1%8b%d1%85-%d0%ba%d0%bd%d0%be%d0%bf%d0%be%d0%ba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
