<?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>Who So &#187; CSS</title>
	<atom:link href="http://www.trondhuso.no/blog/category/webdevelopment/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trondhuso.no/blog</link>
	<description>Blog about PHP, HTML, CSS, patents and all things inbetween</description>
	<lastBuildDate>Tue, 20 Dec 2011 23:45:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Standards matter</title>
		<link>http://www.trondhuso.no/blog/2010/06/22/standards-matter/</link>
		<comments>http://www.trondhuso.no/blog/2010/06/22/standards-matter/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 08:30:29 +0000</pubDate>
		<dc:creator>Trond Husø</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Webdevelopment]]></category>

		<guid isPermaLink="false">http://www.trondhuso.no/blog/?p=261</guid>
		<description><![CDATA[Some thoughts regarding the Browser World War 2 in 2010.]]></description>
			<content:encoded><![CDATA[<p>I am not that great fan of Apple, but sometimes they have an idea of doing things correctly (like when they built the iPod). It&#8217;s when they start getting proprietary that everything hits the fan.<br />
This is what they&#8217;ve said recently:</p>
<blockquote><p><a href="http://www.apple.com/safari/what-is.html" target="_blank">Standards matter. Before standards, every browser had its own play book.</a> With standards, every browser’s on the same page. Great for developers, standards let them create sites that work on all browsers out of the box. Great for the browsing public, they ensure that you enjoy a great experience on every site you visit. And these technologies are free for anyone to use.</p></blockquote>
<p>I am currently spending some time checking out <a href="http://dev.w3.org/html5/spec/Overview.html">HTML5</a> and <a href="http://www.w3.org/Style/CSS/current-work">CSS3</a>. And from what I can see the browser world is now just as unsynchronized as it was in the first browser war.<br />
My inspiration for checking the new features in HTML5 and CSS3 is the fact that so many people are saying that with HTML5 (and CSS3) Flash is dead. </p>
<p>Well. </p>
<p>The good thing about Flash is that it runs on all platforms, though really slow on iPads and iPhones &#8211; but that&#8217;s another issue. It is browser independent, which makes it look the same in all browsers. That&#8217;s what makes Flash a graphic designers choice instead of HTML5/CSS3.<br />
An example I can use is this:<br />
Let&#8217;s say there is a website wanting to show information about the players on the teams playing in the World Cup in South Africa (in 2010). The designer want some animation like flipping cards, sliding in/sliding out and so on. Let&#8217;s say the company creating this application wants to use HTML5. Well, he can&#8217;t:</p>
<ol>
<li><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx" target="_blank">Internet Explorer</a> (from 6 up to current build of IE) does not understand all the 3d-stuff in CSS3</li>
<li><a href="http://www.getfirefox.com" target="_blank">Firefox 3.6</a> (and most likely 3.7) does not understand all the 3d-stuff in CSS3</li>
<li><a href="http://www.opera.no" target="_opera">Opera</a> 10.5 (and most likely 10.6) does not understand all the 3d-stuff in CSS3</li>
<li><a href="http://www.google.com/chrome/">Chrome</a> 5 does not understand all the 3d-stuff in CSS3</li>
</ol>
<p>So there is only Safari (with about 5% of the market) that understands the 3d-stuff in CSS3. Which is not so weird. Apple was one of the promoters of 3D-transformations in CSS.<br />
Also: In Flash there is only one build. There are no specific style sheet for IE(6-X), Firefox, Webkit/Chrome/Safari or Opera. There are no need for [IF IE] in the HTML/CSS-code. </p>
<p>I do hope that the developers and the designers who works with CSS3 and HTML5 at Apple will become advocates of standards and that they will fight for this in their forums. I experienced the lasts browser war (which Microsoft claims it won&#8230; you don&#8217;t win wars, ok! and&#8230; look where it left us: With IE6 still being widely used in 2010!!!). I don&#8217;t want another one in 2010. </p>
<p>And I think there is only one way we can achieve a compliant standard that all browse vendors will follow: Start thinking of your users and the web developers. Stop creating HTML/CSS rendering engines. Standardize on one or two (Webkit and Mozilla, with the latter also being the one to disappear).<br />
Sorry Microsoft. When you are nine years behind&#8230; although you did invent the XMLhttpRequest, most important part of AJAX, why not start contributing to an open source project instead?<br />
And sorry Opera. Your market share is way to small, and I think you are better off using one of the other engines and start contributing to those instead. And: Three is one to many (or three is a crowd as the saying goes).</p>
<p>So what shall the vendors do when they cannot focus on their own engine? </p>
<ul>
<li>Contribute to the two standard engines (webkit/mozilla)</li>
<li>Focus on making the best <strong>looking</strong>, <strong>fastest</strong> or <strong>functional</strong> browser out there.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.trondhuso.no/blog/2010/06/22/standards-matter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proposal: Windows-tag in HTML5</title>
		<link>http://www.trondhuso.no/blog/2010/05/25/proposal-in-html5/</link>
		<comments>http://www.trondhuso.no/blog/2010/05/25/proposal-in-html5/#comments</comments>
		<pubDate>Tue, 25 May 2010 07:31:08 +0000</pubDate>
		<dc:creator>Trond Husø</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Webdevelopment]]></category>

		<guid isPermaLink="false">http://www.trondhuso.no/blog/?p=251</guid>
		<description><![CDATA[Suggestion: windows tag Usage: If you want to create a modal form/window, a &#8220;popup&#8221; or a lightbox you have to use Javascript. I am suggesting this tag to remove the javascript need to create such a standard feature on the web. This technique uses iframe and css to create the look. Implementation: I am suggesting [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Suggestion: </strong>windows tag</p>
<p><strong>Usage:</strong> If you want to create a modal form/window, a &#8220;popup&#8221; or a lightbox you have to use Javascript. I am suggesting this tag to remove the javascript need to create such a standard feature on the web. This technique uses iframe and css to create the look.</p>
<p><strong>Implementation:</strong> I am suggesting that <windows> can use most of the same attributes as iframe/frame.<br />
Adding the following attributes: </p>
<ul>
<li>modal<br />
boolean, if the window shall be modal or not</li>
<li>movable<br />
boolean, true if the window shall be moveable, false if not</li>
<li>fade-background-color<br />
Color, set the background color being used when window opens. Default is dark gray&#8230;</li>
<li>background-opacity<br />
integer, set the transparency for the background</li>
</ul>
<p>I am not part of the W3 HTML 5 working group and I have not posted this suggestion to this group. I am just suggesting it here as something I wish to see in HTML 5. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.trondhuso.no/blog/2010/05/25/proposal-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rapid Application Development under Linux</title>
		<link>http://www.trondhuso.no/blog/2009/12/20/development-under-linux/</link>
		<comments>http://www.trondhuso.no/blog/2009/12/20/development-under-linux/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 08:00:21 +0000</pubDate>
		<dc:creator>Trond Husø</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MonoDevelop]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Gamba]]></category>
		<category><![CDATA[Pascal]]></category>
		<category><![CDATA[rad]]></category>
		<category><![CDATA[Visual Basic]]></category>

		<guid isPermaLink="false">http://www.trondhuso.no/blog/?p=115</guid>
		<description><![CDATA[There are a few ways to develop applications under/for Linux. You can write cross platform applications using MonoDevelop, Real Basic and QT (not pronounced Cute, but Q.T. &#8211; yes, sort of like E.T&#8230;.). Or you can use any other language and use IDEs like Komodo, Eclipse and so on. Coming from the Windows side of [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few ways to develop applications under/for Linux. You can write cross platform applications using <a href="http://www.monodevelop.com" target="_blank" title="MonoDevelop">MonoDevelop, <a href="http://www.realsoftware.com">Real Basic</a> and <a href="http://qt.nokia.com">QT</a> (not pronounced Cute, but Q.T. &#8211; yes, sort of like E.T&#8230;.). Or you can use any other language and use IDEs like <a href="http://www.activestate.com">Komodo</a>, <a href="http://www.eclipse.org">Eclipse</a> and so on.</p>
<p>Coming from the Windows side of things and being used to <a href="http://msdn.microsoft.com/en-gb/vstudio/default.aspx">Visual Basic</a> (I probably have the 1.0 floppy somewhere if I start looking!!!), <a href="http://www.codegear.com">Delphi</a> and now lately <a href="http://msdn.microsoft.com/en-gb/vstudio/default.aspx">Visual Studio</a> (It might seem weird that I&#8217;ve just recently been introduced to VS, but I have mostly coded in <a href="http://www.php.net">PHP</a> and <a href="http://msdn.microsoft.com/en-us/library/aa286483.aspx">classic ASP</a> for the last 8-10 years, and then you sort of don&#8217;t need VS), I have been accustomed to drag&#8217;n drop + double click to add code to the application. I have yet to write an application for <a href="http://www.linux.org">Linux</a>, but I have made a few attempts. My first attempt included being introduced to the <a title="Glade - A User Interface Designer" href="http://glade.gnome.org/" target="_blank">Glade</a> application which is/was used to create the layout of the application &#8211; aka GUI. Then you write the code in another IDE.</p>
<p>This was (hm) a while back &#8211; not writing year here, but I can write years if you like&#8230;</p>
<p><strong>The Good</strong></p>
<p>With the introduction of <a title="MonoDevelop" href="http://monodevelop.com" target="_blank">MonoDevelop</a>, <a title="Real Basic" href="http://www.realsoftware.com/" target="_blank">Real Basic</a> and <a title="QT" href="http://qt.nokia.com/" target="_blank">QT</a> we don&#8217;t have to open one application to create the GUI and a second one to attach code. It is all being done (and taken care of) in one development tool. This is, and I&#8217;d like to emphasize on this, the best way to write applications (my humble opinion &#8211; hey my blog!). The tool and GUI-designer is implemented and things can and should work smoothly. Also: You don&#8217;t have to learn two applications and probably also two &#8220;languages&#8221; &#8211; although I am all for having knowledge in as many programming languages as you can. I can now code in C#, VB.Net, Delphi/Pascal (although somewhat very rusty), Perl (briefly, by no means an expert and more or less a novice  and PHP (if that is considered a programming language).</p>
<p>I have tested QT, MonoDevelop and Real Basic. As I am no C++ developer (but I wish I was!), QT would be my choice of  development tool to use when learning that language. Real Basic has only been tested a few times after listening to Bryan Lunduke (Linux Action Show / Computer Action Show) speaking highly of it. MonoDevelop is as of now the tool I use when I&#8217;m now doing some C# stuff on Linux and trying to get the grips of  GTK-development.</p>
<p>I do want to check out <a title="Python" href="www.python.org/" target="_blank">Python</a> as a programming language as I have heard so much positive things regarding the language. But writing an application where you use <a title="RAD using Python and Glade" href="http://www.linuxjournal.com/article/7421" target="_blank">Glade</a> + editor of choice is not something I want to do. Not in 2009/2010. I think I&#8217;ve read somewhere that it can be possible to write applications in Python using QT, but I haven&#8217;t spent to much time getting this to work &#8211; as I don&#8217;t know that much Python &#8211; yet&#8230;</p>
<p>One thing though: By using <a title="Glade - A User Interface Designer" href="http://glade.gnome.org/" target="_blank">Glade</a> and similar applications you separate logic with presentation which can/is a good thing. But there are also drawbacks to this way of designing and developing applications. More below.</p>
<p><strong>The &#8220;Bad&#8221;</strong></p>
<p>I have also tried Android development in Eclipse, and it seems promising. But again: If the only way to create a GUI is to write XML-code, then no thanks. To the developers of development tools out there: Look at the calendar. It is &#8211; as of writing &#8211; saying December 19 in 2009, start creating drag&#8217;n drop applications.</p>
<p>This also goes for creating Web applications (as this is the new term for web pages). DreamWeaver alternatives for Linux? Not even close. Visual Studio + PHP under Linux. Nope.</p>
<p>Two years ago I attended a class to get a jumpstart on C#-development. And I was shown how to create a zebra-striped/styled datalist in VS. The teacher showed me how to do this in three ways: the first one without using any code, the second way with some code and placing the &#8220;plugin&#8221; and the last way by creating the object and so on.</p>
<p>So let&#8217;s say you have never programmed anything in your entire life. Which one would you start using to get going and to be inspired to code more? First one, most likely &#8211; until you understand that it gives you some restrictions and/or problems down the line. But at least you get inspired. You get the application out there to impress friends/boss/yourself quickly.</p>
<p>There are of course drawbacks to this type of applications. No one can argue that DW and such applications creates optimized code. And I am my self a user of Notepad-like applications to generate PHP-code &#8211; that is &#8211; I have moved from Bluefish to <a title="Aptana Studio" href="http://www.aptana.com" target="_blank">Aptana</a>/<a title="Eclipse - Open Source IDE" href="http://www.eclipse.org/" target="_blank">Eclipse</a>. Sometimes I do wish it was a faster way to create forms than the way I do it now &#8211; even though it doesn&#8217;t take that much time.</p>
<p>I have checked out <a title="Zend Studio" href="http://www.zend.com/products/studio/" target="_blank">Zend Studio</a> &#8211; which is now an Eclipse plugin, and I was hoping that ZS would be the way to do the same thing for PHP under Linux/Windows. Nope &#8211; not as I have found out &#8211; yet. It saddens me. Especially because they market this as <em>&#8220;Zend Studio 7.1 is the next generation of our professional-grade PHP application development environment. It has been designed to maximize developer productivity by enabling you to develop and maintain code faster, solve application problems quickly and improve team collaboration.&#8221;</em></p>
<p>I don&#8217;t think they are close to be a next generation professional-grade PHP application development environment. This is 2009 (soon 2010) and 7.1 should&#8217;ve had drag&#8217;n drop datalists, form creation in place. I hope, how ever, that ZS will in the end turn out to become a drag&#8217;n drop Rapid Web Application development (RWAD &#8211; Coined by Trond Husø on December 19, 2009!!!) tool for PHP.</p>
<p><strong>My Dream!</strong><br />
Maybe, in 2010(not likely) we could have a universal Rapid Application Development tool to be used to develop Linux applications that supports Python, Java, Perl, C, C++, PHP (if you want to!), C# and any other programming languages you can think of. And most importantly: The RAD tool should work out of the box. No spending much time on plugins and so on.</p>
<p><strong>Some links:</strong><br />
There are some RAD applications out there and here are some links:<br />
Python<br />
<a title=" href=" href="http://www.zend.com/products/studio/" target="_blank">Dabo</a></p>
<p><strong>Visual Basic</strong></p>
<p><a title="Gambas" href="http://gambas.sourceforge.net/en/main.html" target="_blank">Gambas</a></p>
<p><a title="MonoDevelop" href="http://monodevelop.com/" target="_blank">MonoDevelop</a></p>
<p><strong>Pascal</strong></p>
<p><a title="Lazarus" href="http://sourceforge.net/projects/lazarus/" target="_blank">Lazarus</a></p>
<p>(more links to come &#8211; obviously&#8230; &#8211; please do suggest some!)</p>
<p>Another discussion regarding development under Linux:</p>
<p><a title="RA development" href="https://ldn.linuxfoundation.org/article/putting-squeeze-python-application-development" target="_blank">Putting the Squeeze on Python Application Development</a></p>
<p>(more links to come)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trondhuso.no/blog/2009/12/20/development-under-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web development and Internet Explorer</title>
		<link>http://www.trondhuso.no/blog/2009/11/24/web-development-and-internet-explorer/</link>
		<comments>http://www.trondhuso.no/blog/2009/11/24/web-development-and-internet-explorer/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 00:44:43 +0000</pubDate>
		<dc:creator>Trond Husø</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[IE9]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[Win 7]]></category>

		<guid isPermaLink="false">http://www.trondhuso.no/blog/?p=96</guid>
		<description><![CDATA[I ramble on Internet Explorer and in particular the upcoming IE 9 - date has not been published.]]></description>
			<content:encoded><![CDATA[<p>Everyone who has designed a website knows about the hassles related to Internet Explorer. Now on IEblog.com Microsoft is doing some advertising for it&#8217;s upcoming new version of IE &#8211; <a title="An early look at ie9 for developers" href="http://blogs.msdn.com/ie/archive/2009/11/18/an-early-look-at-ie9-for-developers.aspx" target="_blank">IE 9</a>. One &#8220;feature&#8221; is that it shall be even more standard compliant, and it shall support rounded corners in CSS3. Which is nice &#8211; because I have used rounded corners and gradients on my web page.</p>
<p>It is interesting to follow the discussion on the ieblog which is oh-so-long. Which is not so weird. IE is of great concern for web developers. We have to code for it so that the website looks correct even in IE6 &#8211; which really is making us go mad. Many times I have spent hours and hours to make the website work in IE6 &#8211; both HTML, CSS and Javascript wize.<br />
It is more than annoying to say the least.</p>
<p>One suggestion that comes up in the comments is for Microsoft to move <a title="Trident Layout Engine (Wikipedia)" href="http://en.wikipedia.org/wiki/Trident_%28layout_engine%29" target="_blank">Trident</a> out of IE and in stead start using <a title="Webkit (Wikipedia)" href="http://en.wikipedia.org/wiki/Webkit" target="_blank">Webkit</a>. We all know that&#8217;s not going to happen. And there are a few reasons for this:</p>
<ol>
<li>Trident is Microsofts own rendering engine and is used not only in Internet Explorer, but also in other applications &#8211; not only from MS. Since we also know that IE is tightly connected to the OS, Trident is most likely used in other applications &#8211; like for instance Explorer.</li>
<li>Because the IE is so tightly connected to the Operating System they can&#8217;t change the rendering engine. It will take up a lot of resources, time and effort to make changes in the OS and then in a lot of MS applications that it won&#8217;t make sense.</li>
<li> MS don&#8217;t really want to follow web standards. They will invent in order to fix problems at hand in the Operating System which isn&#8217;t really Web related.</li>
<li>MS has spent much time and effort on the rendering engine. And since they want to say that they have won the Internet (according to Steve Ballmer, source not found (yet)), they don&#8217;t want to give in.</li>
</ol>
<p>I really wish that IE could be decoupled with the OS. It would mean that I &#8211; as a Linux user &#8211; could download and install IE-X on my Linux Laptop to test out the site on the crippled browser. Now I have to run Windows in a Virtual Machine just to make sure that it works properly. And not only do I have to have a VM. I also need to have multiple versions of Internet Explorer running on the installation as well. This so that I can be sure that it works &#8220;perfectly&#8221; on IE6, IE7 and IE8 (and soon IE9).<br />
I am not sure I want to go down that route.</p>
<p>One thing I am sure of is that I am not supporting IE6. That browser is as old as the dark ages, and less people are using it. As more and more people are moving to Vista and Win7 IE6 will fade and hopefully it will be gone.</p>
<p>And hopefully in 2010 we will have a MS-browser that supports CSS3, CSS2.1 and HTML4 and HTML 5.</p>
<p>I do hope that MS keeps on being innovative. But I hope they do this participating with the Web development community and not against them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trondhuso.no/blog/2009/11/24/web-development-and-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exercise &#8211; creating table using css</title>
		<link>http://www.trondhuso.no/blog/2009/09/12/exercise-creating-table-using-css/</link>
		<comments>http://www.trondhuso.no/blog/2009/09/12/exercise-creating-table-using-css/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 22:57:20 +0000</pubDate>
		<dc:creator>Trond Husø</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.trondhuso.no/blog/?p=42</guid>
		<description><![CDATA[Today I played around with css and the display: table / table-row / table-cell settings. And it worked out quite well. The reason for playing with this was to create a table without using the table-tag. I am not religious regarding using or not using the table-tag to render the page, but some are out [...]]]></description>
			<content:encoded><![CDATA[<p>Today I played around with css and the display: table / table-row / table-cell settings. And it worked out quite well. The reason for playing with this was to create a table without using the table-tag.</p>
<p>I am not religious regarding using or not using the table-tag to render the page, but some are out there, and so it is nice to know how to use css to create a table.</p>
<p>Below is the code that I used to get some data. What it does it looping the &#8220;root&#8221; of my personal development apache server. Then by using the div-tag and css a table is created.</p>
<p>This is the index.php file<br />
<code><br />
&lt;?php<br />
# index.php</code></p>
<p>/*<br />
* This file shall have a little menu in it. It shall also list up the folders we have<br />
* in the root directory<br />
*/<br />
echo &#8216;&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Localhost&lt;/title&gt;<br />
&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;style/localhost.css&#8221; type=&#8221;text/css&#8221; /&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;&#8217;;</p>
<p>if ($handle = opendir(&#8216;.&#8217;)) {<br />
echo $_SERVER['SERVER_NAME'].&#8221; running on: &#8220;;<br />
echo $_SERVER['SERVER_SOFTWARE'].&#8221;&lt;br&gt;&#8221;;<br />
# echo &#8220;Directory handle: $handle\n&#8221;;<br />
echo &#8220;&lt;b&gt;Files:&lt;/b&gt;\n&lt;br&gt;&#8221;;</p>
<p># This will be a test for css and tables<br />
echo &#8220;&lt;div class = \&#8221;table\&#8221;&gt;\n&#8221;;<br />
$rows = 1;<br />
$cols = 0;<br />
$files = 0;<br />
/* This is the correct way to loop over the directory. */<br />
while (false !== ($file = readdir($handle))) {<br />
if (strlen($file) &gt; 2) {<br />
# we shall change rows when we have created three columns<br />
$cols++;</p>
<p>if ($cols == 5) {<br />
echo &#8220;&lt;/div&gt;\n&#8221;;<br />
$cols = 1;<br />
}</p>
<p>if ($cols == 1) {<br />
echo &#8220;&lt;div class = \&#8221;tr&#8221;.$rows.&#8221;\&#8221;&gt;&#8221;;<br />
$rows++;</p>
<p>if ($rows == 3) {<br />
$rows = 1;<br />
}<br />
}</p>
<p>echo &#8220;&lt;div class = \&#8221;td\&#8221;&gt;&#8221;.$file.&#8221;&lt;/div&gt;&#8221;;</p>
<p>}<br />
}</p>
<p>closedir($handle);<br />
echo &#8220;&lt;/div&gt;&#8221;;<br />
}</p>
<p>?&gt;</p>
<p>And this is the CSS-file</p>
<p><code><br />
/*<br />
This style is used to check how to create tables in css<br />
*/</code></p>
<p>div.table {<br />
display: table;<br />
table-layout: fixed;<br />
background-color: rgb(120, 20, 90);<br />
width:100%;</p>
<p>}</p>
<p>div.tr1 {<br />
display: table-row-group;<br />
background-color: #e5e5e5;<br />
}</p>
<p>div.tr2 {<br />
display: table-row-group;<br />
background-color: #bfbfbf;<br />
}<br />
div.td {<br />
display: table-cell;<br />
vertical-align: top;<br />
padding: 2px 0px 3px 0px;<br />
border-bottom: 1px solid #d3d1d1;<br />
width: 20px;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trondhuso.no/blog/2009/09/12/exercise-creating-table-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

