<?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>CSS &#8211; Blackbams Blog</title>
	<atom:link href="https://blog.blackbam.at/category/web-development/css/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.blackbam.at</link>
	<description>development - digital arts - internet</description>
	<lastBuildDate>Tue, 26 May 2015 16:10:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>Responsiveness: Change HTML element order (of e.g. content/sidebars)</title>
		<link>https://blog.blackbam.at/2015/05/26/responsiveness-change-html-element-order-of-e-g-contentsidebars/</link>
					<comments>https://blog.blackbam.at/2015/05/26/responsiveness-change-html-element-order-of-e-g-contentsidebars/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Tue, 26 May 2015 15:30:44 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[responsiveness]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=2242</guid>

					<description><![CDATA[The following technique is very useful if you have to make existing websites responsive and e.g. want to have two sidebars after the main content without changing the original HTML. You can define the order of the HTML element which have a common parent element by doing the following: .parent { display:-webkit-box; display:-moz-box; display:box; -webkit-box-orient:vertical; [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>The following technique is very useful if you have to make existing websites responsive and e.g. want to have two sidebars after the main content without changing the original HTML. You can define the order of the HTML element which have a common parent element by doing the following:</p>
<pre lang="css">.parent {
  display:-webkit-box;
  display:-moz-box;
  display:box;
  -webkit-box-orient:vertical;
  -moz-box-orient:vertical;
  box-orient:vertical
}

.child1 {
    -webkit-box-ordinal-group:2;
    -moz-box-ordinal-group:2;
    box-ordinal-group:2;
}

.child2 {
  -webkit-box-ordinal-group:3;
  -moz-box-ordinal-group:3;
  box-ordinal-group:3;
}

.child3 {
  -webkit-box-ordinal-group:1;
  -moz-box-ordinal-group:1;
  box-ordinal-group:1;
}</pre>
<p>Old box model &#8211; more info on the new flexbox model: <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">https://css-tricks.com/snippets/css/a-guide-to-flexbox/</a></p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2015%2F05%2F26%2Fresponsiveness-change-html-element-order-of-e-g-contentsidebars%2F&#038;title=Responsiveness%3A%20Change%20HTML%20element%20order%20%28of%20e.g.%20content%2Fsidebars%29" data-a2a-url="https://blog.blackbam.at/2015/05/26/responsiveness-change-html-element-order-of-e-g-contentsidebars/" data-a2a-title="Responsiveness: Change HTML element order (of e.g. content/sidebars)"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2015/05/26/responsiveness-change-html-element-order-of-e-g-contentsidebars/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CSS: NTH-Child selector ignore hidden element</title>
		<link>https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/</link>
					<comments>https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Wed, 08 Apr 2015 22:27:14 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[nth-child]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[~]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=2223</guid>

					<description><![CDATA[Recently I discovered some short solution for ignoring a single hidden element with the nth-child selector. If you struggle with the same problem the following might be useful: This is the HTML: a b c d e The following CSS adds a margin right to every second visible element no matter which element has the cpw [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Recently I discovered some short solution for ignoring a single hidden element with the nth-child selector. If you struggle with the same problem the following might be useful:</p>
<p>This is the HTML:</p>
<pre lang="html">
<span class="video_prewrap">a</span>
<span class="video_prewrap">b</span>
<span class="video_prewrap">c</span>
<span class="video_prewrap cpw">d</span>
<span class="video_prewrap">e</span>

</pre>
<p>The following CSS adds a margin right to every second visible element no matter which element has the cpw class.</p>
<pre lang="css">
.cpw {
    display:none;
}

.video_prewrap {
    margin-right:20px;
}

.video_prewrap:nth-child(2n) {
    margin-right:0;
}

.cpw ~ .video_prewrap:nth-child(2n) {
    margin-right:20px;
}

.cpw ~ .video_prewrap:nth-child(2n-1) {
    margin-right:0;
}

</pre>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2015%2F04%2F09%2Fcss-nth-child-selector-ignore-hidden-element%2F&#038;title=CSS%3A%20NTH-Child%20selector%20ignore%20hidden%20element" data-a2a-url="https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/" data-a2a-title="CSS: NTH-Child selector ignore hidden element"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to center a div with floating elements and variable width horizontally using pure CSS</title>
		<link>https://blog.blackbam.at/2014/02/26/how-to-center-a-div-with-floating-elements-and-variable-width-horizontally-using-pure-css/</link>
					<comments>https://blog.blackbam.at/2014/02/26/how-to-center-a-div-with-floating-elements-and-variable-width-horizontally-using-pure-css/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Wed, 26 Feb 2014 00:43:31 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS basics]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=2171</guid>

					<description><![CDATA[In this very short article I am going to show you how to center a div containing floating elements horizontally with pure CSS. Although it should be a simple problem, sometimes it can be annoying to get something centered. So here is a very simple solution for this problem: How to center a div: margin: [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this very short article I am going to show you how to center a div containing floating elements horizontally with pure CSS. Although it should be a simple problem, sometimes it can be annoying to get something centered. So here is a very simple solution for this problem:</p>
<p>How to center a div:</p>
<pre lang="css">  
  margin: 0 auto;
  
</pre>
<p>&nbsp;</p>
<p>How to center text elements:</p>
<pre lang="css">  
  text-align:center;
  
</pre>
<p>&nbsp;</p>
<p>How to center a div containing floating elements:</p>
<p>HTML:</p>
<p>&nbsp;</p>
<p>&lt;div id=&#8221;wrapper&#8221;&gt;<br />&lt;div id=&#8221;div_to_center&#8221;&gt;<br />&lt;ul&gt;<br />&lt;li class=&#8221;item&#8221;&gt;abc&lt;/li&gt;<br />&lt;li class=&#8221;item&#8221;&gt;def&lt;/li&gt;<br />&lt;/ul&gt;<br />&lt;/div&gt;<br />&lt;/div&gt;</p>
<p>&nbsp;</p>
<pre lang="css"> 
  
#wrapper {
    text-align:center;
}

#div_to_center {
    margin:0 auto;
    display:inline-block;
}

#div_to_center .item {
    float:left;
    display:inline-block;
}
  </pre>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2014%2F02%2F26%2Fhow-to-center-a-div-with-floating-elements-and-variable-width-horizontally-using-pure-css%2F&#038;title=How%20to%20center%20a%20div%20with%20floating%20elements%20and%20variable%20width%20horizontally%20using%20pure%20CSS" data-a2a-url="https://blog.blackbam.at/2014/02/26/how-to-center-a-div-with-floating-elements-and-variable-width-horizontally-using-pure-css/" data-a2a-title="How to center a div with floating elements and variable width horizontally using pure CSS"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2014/02/26/how-to-center-a-div-with-floating-elements-and-variable-width-horizontally-using-pure-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Some useful tipps for CSS development</title>
		<link>https://blog.blackbam.at/2010/12/16/some-tipps-for-better-css/</link>
					<comments>https://blog.blackbam.at/2010/12/16/some-tipps-for-better-css/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Wed, 15 Dec 2010 23:58:16 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS Sprites]]></category>
		<category><![CDATA[CSS tipps]]></category>
		<category><![CDATA[font-face]]></category>
		<category><![CDATA[LessCSS]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">http://www.blackbam.at/blog/?p=1008</guid>

					<description><![CDATA[Recently I was confronted with some lectures about certain topics relating to Cascading Stylesheets. I decided to write a short summary to remember and use these things as I need them in future projects. 1. CSS-Sprites CSS-Sprites are the idea of using one large as background for multiple graphics on a web page. Relative positioning [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><br class="spacer_" /></p>
<p>Recently I was confronted with some lectures about certain topics relating to Cascading Stylesheets. I decided to write a short summary to remember and use these things as I need them in future projects.</p>
<p><br class="spacer_" /></p>
<h2>1. CSS-Sprites</h2>
<p>CSS-Sprites are the idea of using one large as background for multiple graphics on a web page. Relative positioning of the background always guarantees that the correct part of the &#8220;master image&#8221; is displayed.</p>
<p><br class="spacer_" /></p>
<h4>Example of Sprites</h4>
<p>(only the correct button is displayed on the page).</p>
<p><br class="spacer_" /></p>
<p><img decoding="async" src="file:///C:/Users/Blackbam/AppData/Local/Temp/moz-screenshot-2.png" alt="" /></p>
<p><a rel="attachment wp-att-1013" href="https://blog.blackbam.at/2010/12/16/some-tipps-for-better-css/sprites/"><img decoding="async" class="alignnone size-full wp-image-1013" title="CSS-Sprites" src="https://blog.blackbam.at/wp-content/uploads/2010/12/sprites.png" alt="" width="160" height="121" /></a></p>
<p><br class="spacer_" /></p>
<h4>Why use CSS-sprites?</h4>
<ul>
<li>the performance of a site with high traffic is much better</li>
<li>there is only one HTTP-Request required, instead of many (also a performance thing)</li>
<li>changing the design can be much faster, if there is only one image (imagine you have to build a lot of child theme sites)</li>
</ul>
<p><br class="spacer_" /></p>
<h4>Disadvantages</h4>
<ul>
<li>can become complex if over-used or with big webpages</li>
<li>problems with dynamic layouts, if there are changes on the site (be careful)</li>
</ul>
<p><br class="spacer_" /></p>
<h4>Implementation</h4>
<pre lang="CSS">background-position: 123px 123px;

</pre>
<h4>Further instructions and examples</h4>
<p><a href="http://www.css-tricks.com/date-display-with-sprites/">http://www.css-tricks.com/date-display-with-sprites/</a></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<h2>2. Less CSS</h2>
<p>Less CSS is a project to use variables, mixins, nested options and nested rules with CSS (Why is this not possible with native CSS?) It is an interresting way to simplify and speed up CSS development.</p>
<p><br class="spacer_" /></p>
<p><strong>Example</strong></p>
<p><br class="spacer_" /></p>
<pre lang="CSS">/* variables */
@brand_color: #4D926F;

#header {
  color: @brand_color;
}

h2 {
  color: @brand_color;
}

/* mixins */
.rounded_corners (@radius: 5px) {
  -moz-border-radius: @radius;
  -webkit-border-radius: @radius;
  border-radius: @radius;
}

#header {
  .rounded_corners;
}

#footer {
  .rounded_corners(10px);
}

/* nested rules */
#header {
  color: red;
  a {
    font-weight: bold;
    text-decoration: none;
  }
}

/* operations */
@the-border: 1px;
@base-color: #111;

#header {
  color: @base-color * 3;
  border-left: @the-border;
  border-right: @the-border * 2;
}

#footer {
  color: (@base-color + #111) * 1.5;
}
</pre>
<p><br class="spacer_" /></p>
<h4>Why use CSS-sprites?</h4>
<p>Because they faster and cleaner CSS development is possible, with even more possibilities. The CSS must be interpreted by Javascript or PHP before it is usable by a browser &#8211; of course this is a performance desaster &#8211; but you can use one-time interpreted CSS for your project in the end, so there is no need to do this on a running website!</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<h4>Implementation and further instructions</h4>
<p><a href="http://lesscss.org/">http://lesscss.org/</a></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>Recently I was confronted with some lectures about certain topics  relating to Cascading Stylesheets. I decided to write a short summary to  remember and use these things as I need them in future projects.</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<h2>3. Use Cross-Browser @font-face</h2>
<p>@font-face is an very old CSS property, which makes it possible, to use any font on a website, which you want to (as long as you have the rights to do this). This is less work to do than using images and much more interresting than only using the standard fonts.</p>
<p><br class="spacer_" /></p>
<h4>Example of @font-face</h4>
<p>You can also use exotic fonts as normal (robot readable) fonts on a website, like this:</p>
<p><br class="spacer_" /></p>
<p><a rel="attachment wp-att-1034" href="https://blog.blackbam.at/2010/12/16/some-tipps-for-better-css/font-face-exmaple-sears-tower/"><img decoding="async" class="alignnone size-medium wp-image-1034" title="font-face-exmaple-sears-tower" src="https://blog.blackbam.at/wp-content/uploads/2010/12/font-face-exmaple-sears-tower-450x77.png" alt="" width="264" height="45" srcset="https://blog.blackbam.at/wp-content/uploads/2010/12/font-face-exmaple-sears-tower-450x77.png 450w, https://blog.blackbam.at/wp-content/uploads/2010/12/font-face-exmaple-sears-tower.png 508w" sizes="(max-width: 264px) 100vw, 264px" /></a><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><img decoding="async" src="file:///C:/Users/Blackbam/AppData/Local/Temp/moz-screenshot-2.png" alt="" /></p>
<p><br class="spacer_" /></p>
<h4>Why use @font-face?</h4>
<ul>
<li>individual websites with artistic elements can use normal text</li>
</ul>
<p><br class="spacer_" /></p>
<h4>Disadvantages</h4>
<ul>
<li>implementation and conversion may cost some extra minutes</li>
<li>maybe legal problems with commercial fonts</li>
</ul>
<ul>
<p><br class="spacer_" /></p>
</ul>
<h4>Implementation</h4>
<p>For cross-browser implementation, you have to provide your font in at least 3 formats currently &#8211;  EOT,WOFF and TTF.</p>
<p><br class="spacer_" /></p>
<pre lang="CSS">@font-face {
  font-family: 'WebFont';
  src: url('myfont.eot');  /* IE6-8 */
  src: local('☺'),
        url('myfont.woff') format('woff'),  /* FF3.6, IE9 */
        url('myfont.ttf') format('truetype');  /* Saf3+,Chrome,FF3.5,Opera10+ */
}

h1 {
  font-family:'WebFont',Arial,Helvetica,sans-serif;
}
</pre>
<h4>Further instructions and examples</h4>
<p><a href="http://www.font2web.com/">http://www.font2web.com/</a> (convertes a font from one font format to all expected formats)</p>
<p><a href="http://www.fontsquirrel.com/">http://www.fontsquirrel.com/</a> (a lot of FREE fonts to use with your web project)</p>
<p><a href="http://paulirish.com/2009/fighting-the-font-face-fout/">http://paulirish.com/2009/fighting-the-font-face-fout/</a> (prevent Firefox to show the wrong font, solve a lot of forther problems)</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>This might list might be continued&#8230;<br class="spacer_" /></p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2010%2F12%2F16%2Fsome-tipps-for-better-css%2F&#038;title=Some%20useful%20tipps%20for%20CSS%20development" data-a2a-url="https://blog.blackbam.at/2010/12/16/some-tipps-for-better-css/" data-a2a-title="Some useful tipps for CSS development"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2010/12/16/some-tipps-for-better-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
