DIV layer with 100% height, the Javascript way July 1st, 2009
When you create a div layer with 100% width and height, the height is always only the height of the browser window, not of the page content (which can be much higher).
To solve this, give the layer div an id and use the following JS code inside the layer div:
<script type="text/javascript">document.getElementById("yourlayerid").style.height = document.getElementsByTagName("body")[0].offsetHeight + "px";</script>
The code is very simple, it gets the height of the content (the body element) and gives it the layer div.
Tested in Opera, Firefox and *barf* MSIE (8).
Posted in Programming | No Comments »
YAST (Yet Another Standard Theme) Wordpress theme September 27th, 2008
Bugfix Release v1.1 is available! For more info’s take a look at the end of this article.
YAST (Yet Another Standard Theme) is a good looking kubrik compliant theme for Wordpress.
You are looking at it RIGHT NOW!
It is not only good looking, the additional features are really nice:
- Customizable head area
- Customizable background colors
- Ability to switch the menu right or left handed
- The images are only 14.1 KB in size, including the head image!
- Out of the box localized with the following languages:
- bg_BG
- ca
- da_DK
- de_DE
- es_ES
- fa_IR
- fr_FR
- hu_HU
- id_ID
- it_IT
- ja
- ko_KR
- lv
- ms_MY
- pt_BR
- pt_PT
- ru_RU
- sr_RS
- sv_SE
- ta_IN
- zh_CN
But i won’t conceal that there’s a handicap: It WILL look ugly in MS-IE 6.0 and under. That’s because MS-IE 6.0 is giving a shit about W3C compliant programming. With MS-IE 7.0 and above everything looks good.
Do you want to know what this theme looks like in other colors?
Ok, try this: Red, Green, Blue, Yellow, Cyan, Magenta (this doesn’t work correctly in IE, please use Firefox or Opera instead)
You can set any color you whish, just follow the steps beneath.
How do i customize it?
Its easy:
- For the head area, simply replace the file /yast/img/logo.jpg with a jpg of your choice, it should be 810 by 134 pixels in size, if it’s smaller it will be tiled, if it’s bigger some areas aren’t shown and a waste of traffic.
- For the background colors (you see them in blue here) edit this file at the end (there will be more instructions there): /yast/style.css
- To switch the menu to the left side, edit this file at the end (there will be more instructions there): /yast/style.css
- to change the background tile, simply replace the file /yast/img/bg.png with a png of your choice.
- If you want this theme in your native language, you have to be sure to set the “define (‘WPLANG’, ”);” directive in your wp-config.php correctly (e.g. “define (‘WPLANG’, ‘de_DE’);” for german).
How do i install it?
- Download the .zip and copy it to your /wp-content/themes/ directory
- Unzip it
- Go to your WordPress admin area and to the “Design” area
- Click on the link pronouncing “YAST (Yet Another Standard Theme)”, afterwards klick the link on the upper right corner of the popup.
That’s it! Have fun!
Download: YAST Theme For WordPress v1.1
The CSS, XHTML and design is released under GPL license.
The Update from v1.0 to v1.1 is a bugfix release only.
Release notes:
- Fixed a bug causing the document not to be valid XHTML 1.0 Transitional.
- Fixed a bug causing the layout to crash if the “search widget” is used instead of the standard menu.
The updated files are: style.css, index.php, search.php, single.php, functions.php and searchform.php.
Updaters have to replace this files only.