<?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>Fritz Thomas &#187; HTML</title>
	<atom:link href="http://fritzthomas.com/tags/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://fritzthomas.com</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 08:02:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to vertically align text and block elements</title>
		<link>http://fritzthomas.com/overall/418-how-to-vertically-align-text-and-block-elements/</link>
		<comments>http://fritzthomas.com/overall/418-how-to-vertically-align-text-and-block-elements/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 12:42:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Overall]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[inline-block]]></category>
		<category><![CDATA[vertical-align]]></category>

		<guid isPermaLink="false">http://fritzthomas.com/?p=418</guid>
		<description><![CDATA[You may know the CSS declarations text-align and vertical-align. Perhaps you tried alredy to vertically align inline span elements within a div block element but did not succeed yet. I will try explain how to achieve this with a simple button example. Before: After: Lets begin with the markup for the buttons: 1 2 3 [...]]]></description>
			<content:encoded><![CDATA[<p>You may know the CSS declarations text-align and vertical-align. Perhaps you tried alredy to vertically align inline span elements within a div block element but did not succeed yet. I will try explain how to achieve this with a simple button example.<br />
Before:<img style="vertical-align:middle" class="alignnone size-full wp-image-420" title="screenshot14" src="http://fritzthomas.com/wp-content/uploads/2009/02/screenshot14.png" alt="screenshot14" width="115" height="24" /><br />
After: <img style="vertical-align:middle" class="alignnone size-full wp-image-419" title="screenshot13" src="http://fritzthomas.com/wp-content/uploads/2009/02/screenshot13.png" alt="screenshot13" width="112" height="25" /><br />
<span id="more-418"></span><br />
 Lets begin with the markup for the buttons:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;buttons&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;add button&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;icon&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;add.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span>&gt;</span>Add<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;delete button&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;icon&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;delete.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span>&gt;</span>Delete<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>Each Button is within a single div. Every button has its icon and a button text. Image and Text are in a span tag. the &#8220;add&#8221; and &#8220;delete&#8221; class is added to differentiate the buttons. This is useful if you want to add some behavior in JavaScript.<br />
<div style="width:100%;text-align:center;padding:0;margin:0;border:0;overflow:hidden;clear:both;"><script type="text/javascript"><!--
google_ad_client = "pub-1963733382421272";
google_ui_features = "rc:0";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_alternate_ad_color = "ffffff";
google_color_border = "ffffff";
google_color_bg = "ffffff";
google_color_link = "319BD8";
google_color_text = "666666";
google_color_url = "319BD8";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div></p>
<p>Next, the CSS styles:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.buttons</span> <span style="color: #6666ff;">.button</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/** important **/</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">16px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</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;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</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;">#a1a1a1</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ffffff</span><span style="color: #00AA00;">;</span>
  border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/** CSS3 **/</span>
  -moz-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/** Mozilla specific **/</span>
  -webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/** Make a guess ;-) **/</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: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> hand<span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.buttons</span> <span style="color: #6666ff;">.button</span> <span style="color: #6666ff;">.icon</span> <span style="color: #00AA00;">&#123;</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: #808080; font-style: italic;">/** important **/</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: #808080; font-style: italic;">/** important **/</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;">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;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.buttons</span> <span style="color: #6666ff;">.button</span> <span style="color: #6666ff;">.text</span> <span style="color: #00AA00;">&#123;</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: #808080; font-style: italic;">/** important **/</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: #808080; font-style: italic;">/** important **/</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;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><div style="float:left;margin-left:0,margin-right:4px;margin-top:4px;margin-bottom:0;padding:4px;border:0;"><script type="text/javascript"><!--
google_ad_client = "pub-1963733382421272";
google_ad_slot = "3802836967";
google_ad_width = 120;
google_ad_height = 240;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<p>The important css declarations and attributes are &#8220;display: inline-block&#8221;, &#8220;vertical-align: middle&#8221; and &#8220;line-height: XXpx&#8221;. The line-height tells every .button block the exact height of the inline elements underneath. The inline elements .icon and .text are handled and displayed as an &#8220;inline-block&#8221;. Firefox 3 and most of the other major browsers supporting it so it is safe to use it. <a href="http://www.quirksmode.org/css/display.html">Read more on this.</a><br />
<br />
The result should look like this:<img style="vertical-align:middle" class="alignnone size-full wp-image-419" title="screenshot13" src="http://fritzthomas.com/wp-content/uploads/2009/02/screenshot13.png" alt="screenshot13" width="112" height="25" /><br />
I think the example is simple enough to adapt it to your needs and other use cases. Please keep in mind that in the example i use -moz-border-radius. This declaration is mozilla specific. So if you want rounded corners in IE you have to wait until IE is implementing this. Take <a href="http://a.deveria.com/caniuse/#feat=roundedcorners">a look</a> when this is scheduled and <a href="http://fritzthomas.com/overall/407-charts-of-when-we-can-use-features-of-html-svg-and-css3/#refuse-internet-explorer">follow my suggestion.</a></p>

	Tags: <a href="http://fritzthomas.com/tags/css/" title="css" rel="tag">css</a>, <a href="http://fritzthomas.com/tags/css3/" title="CSS3" rel="tag">CSS3</a>, <a href="http://fritzthomas.com/tags/how-to/" title="how-to" rel="tag">how-to</a>, <a href="http://fritzthomas.com/tags/howto/" title="howto" rel="tag">howto</a>, <a href="http://fritzthomas.com/tags/html/" title="HTML" rel="tag">HTML</a>, <a href="http://fritzthomas.com/tags/inline-block/" title="inline-block" rel="tag">inline-block</a>, <a href="http://fritzthomas.com/tags/vertical-align/" title="vertical-align" rel="tag">vertical-align</a><br />

	<h4>&Auml;hnliche Beitr&auml;ge:</h4>
	<ul class="st-related-posts">
	<li><a href="http://fritzthomas.com/overall/415-css-browser-compatiblity/" title="CSS Browser Compatiblity (February 18, 2009)">CSS Browser Compatiblity</a> (0)</li>
	<li><a href="http://fritzthomas.com/php/zend-framework/33-how-to-teil-1-projektaufbau-konventionen-und-modulare-verzeichnisstruktur/" title="Zend Framework How-To Teil 1: Projektaufbau, Konventionen und modulare Verzeichnisstruktur (January 28, 2008)">Zend Framework How-To Teil 1: Projektaufbau, Konventionen und modulare Verzeichnisstruktur</a> (13)</li>
	<li><a href="http://fritzthomas.com/open-source/linux/12-aendern-oder-setzen-eines-statischen-netzwerk-device-namen-unter-gentoo-eth0-eth1ethn/" title="Setzen eines statischen Netzwerk Device Namen unter Gentoo. (eth0,eth1,&#8230;) (December 27, 2007)">Setzen eines statischen Netzwerk Device Namen unter Gentoo. (eth0,eth1,&#8230;)</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://fritzthomas.com/overall/418-how-to-vertically-align-text-and-block-elements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amaltas: Paint f&#252;r den Browser mittels SVG</title>
		<link>http://fritzthomas.com/overall/28-amaltas-paint-fur-den-browser-mittels-svg/</link>
		<comments>http://fritzthomas.com/overall/28-amaltas-paint-fur-den-browser-mittels-svg/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 08:29:41 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Overall]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://fritzthomas.com/allgemein/28-amaltas-paint-fr-den-browser-mittels-svg/</guid>
		<description><![CDATA[Noch vor ein bis zwei Jahren h&#228;tte man bei der Demo Applikation von Amaltas die es erm&#246;glicht im Browser zu zeichnen, vermutlich als erstes an Flash gedacht und nicht an &#8220;Html&#8221;. Echt beeindruckend. Bis alle Browser oder svg nativ unterst&#252;tzen werden solche Applikationen wohl eine Demo bleiben. Tags: HTML, JavaScript, SVG &#196;hnliche Beitr&#228;ge: Super Mario [...]]]></description>
			<content:encoded><![CDATA[<p>Noch vor ein bis zwei Jahren h&auml;tte man bei der Demo Applikation von <a href="http://www.amaltas.org/svgapp/">Amaltas</a> die es erm&ouml;glicht im Browser zu zeichnen, vermutlich als erstes an Flash gedacht und nicht an &#8220;Html&#8221;. Echt beeindruckend. Bis alle Browser oder svg nativ unterst&uuml;tzen werden solche Applikationen wohl eine Demo bleiben.</p>

	Tags: <a href="http://fritzthomas.com/tags/html/" title="HTML" rel="tag">HTML</a>, <a href="http://fritzthomas.com/tags/javascript/" title="JavaScript" rel="tag">JavaScript</a>, <a href="http://fritzthomas.com/tags/svg/" title="SVG" rel="tag">SVG</a><br />

	<h4>&Auml;hnliche Beitr&auml;ge:</h4>
	<ul class="st-related-posts">
	<li><a href="http://fritzthomas.com/javascript/49-super-mario-bros-in-javascript/" title="Super Mario Bros in JavaScript (April 9, 2008)">Super Mario Bros in JavaScript</a> (0)</li>
	<li><a href="http://fritzthomas.com/javascript/extjs/322-interesting-features-for-extjs-on-their-roadmap/" title="Interesting Features for ExtJS on their Roadmap (November 5, 2008)">Interesting Features for ExtJS on their Roadmap</a> (0)</li>
	<li><a href="http://fritzthomas.com/php/25-html-purifier-300-released/" title="HTML Purifier 3.0.0 Released (January 15, 2008)">HTML Purifier 3.0.0 Released</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://fritzthomas.com/overall/28-amaltas-paint-fur-den-browser-mittels-svg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Purifier 3.0.0 Released</title>
		<link>http://fritzthomas.com/php/25-html-purifier-300-released/</link>
		<comments>http://fritzthomas.com/php/25-html-purifier-300-released/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 13:52:23 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://fritzthomas.com/php/25-html-purifier-300-released/</guid>
		<description><![CDATA[Die erste von HTML Purifier Release im Jahr 2008 ist eine &#8220;PHP5-Only&#8221; Release. Die Version 2.1 wird zwar weiter unterst&#252;tzt, aber nicht mehr weiterentwickelt. Die neue Version s&#228;ubert den HTML Code unter anderem von XSS Code aufgrund einer Whitelist. Ausserdem kann das HTML bevor es ausgegeben wird in valides HTML oder XHTML umgewandelt werden. Um [...]]]></description>
			<content:encoded><![CDATA[<p>Die erste von <a href="http://htmlpurifier.org">HTML Purifier</a> Release im Jahr 2008 ist eine &#8220;PHP5-Only&#8221; Release. Die Version 2.1 wird zwar weiter unterst&uuml;tzt, aber nicht mehr weiterentwickelt.</p>
<p>Die neue Version s&auml;ubert den HTML Code unter anderem von XSS Code aufgrund einer Whitelist. Ausserdem kann das HTML bevor es ausgegeben wird in valides HTML oder XHTML umgewandelt werden. Um diesen Vorgang, der bei gro&szlig;er Last des Servers schon einige Sekunden dauern kann, zu beschleunigen unterst&uuml;tzt der HTMLPurifier auch Caching. Zus&auml;tzlich zu der schon vorhanden PHP Extension HTMLTidy geht der HTML Purifier noch weiter und erleichtert und erweiter die Konfiguration und somit sehr flexibel was die Umwandlung spezieller HTML Tags, den Doctype oder CSS Attribute angeht.</p>
<p>Wo genau der Unterschied zu anderen Librarys oder nativen PHP Befehlen liegt, soll in dieser <a href="http://htmlpurifier.org/comparison.html">Vergleichstabelle</a> gezeigt werden.</p>

	Tags: <a href="http://fritzthomas.com/tags/html/" title="HTML" rel="tag">HTML</a>, <a href="http://fritzthomas.com/tags/php/" title="PHP" rel="tag">PHP</a>, <a href="http://fritzthomas.com/tags/php5/" title="PHP5" rel="tag">PHP5</a>, <a href="http://fritzthomas.com/tags/xss/" title="XSS" rel="tag">XSS</a><br />

	<h4>&Auml;hnliche Beitr&auml;ge:</h4>
	<ul class="st-related-posts">
	<li><a href="http://fritzthomas.com/php/10-zend_layout-zend_view_enhanced/" title="Zend_Layout, Zend_View_Enhanced (December 16, 2007)">Zend_Layout, Zend_View_Enhanced</a> (0)</li>
	<li><a href="http://fritzthomas.com/php/26-zend-studio-for-eclipse-release-steht-vor-der-tr/" title="Zend Studio for Eclipse Release steht vor der T&uuml;r (January 17, 2008)">Zend Studio for Eclipse Release steht vor der T&uuml;r</a> (0)</li>
	<li><a href="http://fritzthomas.com/overall/29-zend-studio-6-0-0-eclipse-released/" title="Zend Studio 6.0.0 Eclipse Released (January 23, 2008)">Zend Studio 6.0.0 Eclipse Released</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://fritzthomas.com/php/25-html-purifier-300-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
