Friday, January 22, 2010

z-index only with absolute position - a one liner

A one liner can be very useful sometimes, so just read the title, hope it helps! ;)

Thursday, January 14, 2010

Center div with margin: 0 auto - a one liner

The best and cleanest way to center a div is to use the margin: 0 auto attributes in styles. Make sure however that you set a width of the div to something specific otherwise it's not going to work.

Note: it seems that this unfortunately doesn't work in IE7. Alternatively you may use the <center> tag.

See an example of the style attribute below:
(click in the box to highlight the code for copy)

Thursday, December 17, 2009

Fixed DIV at the bottom of a page

Ever wondered how they make it on those websites where there's a menu or options always sticking to the bottom of the page? Well, i was, so I digged a bit and found this thread: Create a fixed DIV at the bottom of a page even if the page scrolls just like Facebook's bottom menu..

It's amazing how many things you can actually do with CSS without actually having to use any script, isn't it?

Monday, December 14, 2009

background image overlap using negative (minus) margins

I fell in love with a menu style so I thought I'm going to do it myself. What I really liked about it was not only the rounded style but also that it seemed to overlap to the image above. With the very comprehensive help of The Definitive Guide to Using Negative Margins I managed to do it just the way I wanted.

See a snapshot of the part I was talking about:

overlapping background

Tuesday, December 08, 2009

How to upload a Joomla! website's localhost version to my hosting server

Note: this article assumes that you use XAMPP to test your website offline - see one of my eariler articles about it here. The first suggested installation method of the Absolute Beginners Guide to Joomla! is XAMPP too.

Sunday, November 29, 2009

Select (highlight) All Javascript

To ease your work, I decided to equip my code boxes with a 'Select All' function, so that you can easily highlight the text in the box, copy it and paste it into your .html file. I searched a lot and the only one that really worked for me and was very simple was the forum thread called Select All Text In A Form Field On Click. You can test this by clicking into any of the code boxes I posted.

Friday, November 27, 2009

How to add line breaks into a textarea

I use the textarea tag when I include code into my posts, but I wasn't able to figure out a way to add a line break in there as the <br/> tag would be displayed in a textarea instead of actually breaking the line. Well, as I could find out through the article Adding/Insert Line Breaks into a Textarea the key is to add this 'code' instead: &#13;

It's tiny but can be really annoying if you don't have the information. ;)

Friday, November 06, 2009

Some "cosmetics" applied to G&G Home website

Let me just post a little note about that I did some cosmetics to a website of a team of 2 industrial designers, called G&G Home. The website was built of images only, so no text (not very good SEO, but I guess it's not the intention). The problem was that the images although well designed, the background was still white.