Saturday, August 24, 2013

004 Sticky footer problem finally solved

Today's Picture:

For the last one year, I have been facing the problem of sticky footer at a sub-domain website of mine. To avoid the embarrassing situation of footer appearing in the middle of the page, I had to remove the footer and allow all the three dynamic columns (left, middle, right), which do not have fixed height.

I use the following layout:
Top one division with 100% width.
Next:
left div with width of approx.20%.
middle div starts at 21% with width of 59%.
right div starts at 81% with width of 18%.
All the columns have borders.
All the columns get their data from php/html files. Hence, their height varies. Giving a fixed height, and overflow-scroll, I used for sometime. But, somehow, it did not satisfy me.


Visiting numerous websites containing css support threads educated me, but could not solve my problem because of the burden of three dynamic divs.


Finally, today, I could solve the problem by using a very simple technique. For the benefit of my readers, I present it below.


Last column, last division in my above layout, usually gets the highest height. It starts at 81% margin-left, with 18% width, 1% border, ends at 100%.

Here I added the following style:

<div style='position:relative; overflow:auto; ' > Content.

</div>.

Now, the footer div:

<div style='width:100%; float:left; height:60px; background:#aaaaff;'>
content.
</div.>


All the divisions, have their position:absolute. Exception is the last and lengthiest right division.


You can also see this demo at alternate site: ayyo.x10.mx.

If the above technique does not work, probable reasons

Pl. check up all the previous divisions, whether they have proper closing tags and some other errors, which may be affecting their position, and float.

Friday, February 15, 2013

003 Geany or Gedit which is better?



Question: Geany or Gedit, which is better?


Latest answer added on 29.8.2018, after using both Geany and Gedit for about ten years:


In my pesonal view, the greatest merit of Geany over Gedit is, Geany's convenient and nearly unlimited additions to the Snippets.conf file. This Snippets file is something similar to 'Auto-complete' in MS Word. But Geany Snippets are more flexible and convenient than the Autocomplete in MS Word.

The Snippets file in Gedit requires identification of a hotkey for each snippet. As the availability of hotkeys will be limited, soon we get exhausted of the hotkeys. Adding snippets and hotkeys in Gedit is more complicated.
Previous answer given by me some years back: Gedit is the default text editor which we get with Ubuntu.
It is an excellent text editor, particularly for regex based searches and replacements.
But, I feel that, it is slow in saving large files.
It may, sometimes, hang on.
For editing codes such as html, javascript and php,  gedit has good color combinations.

Geany on the other hand needs download.
sudo add-apt-repository ppa:geany-dev/ppa
sudo apt-get update
sudo apt-get update sudo apt-get install geany
sudo apt-get intall geany-plugins.

Geany is particularly convenient for handling very large-files. It saves almost instantly.

summary: For editing short-files, I prefer gedit. For editing-long-files, I prefer geany.   For editing codes, I suggest gedit.  For editing texts, I suggest geany.
How to avoid sudo every-time?
At the command-line, we have to type the following: sudo -i and press enter key. We have to give super-user password, when the system prompts. The terminal line will change from $ to #. User name will change to root.

Incomplete. More content will be added shortly.

Tuesday, January 29, 2013

002 Nautilus BETTER THAN filezilla

I am a linux-fan. Ubuntu flavor of linux. 10.10 version.
Tired of Windows concealing ways, I shifted to ubuntu about two years back.
I regularly depended on the command sudo apt-get install ... for installing new packages. It has never disappointed me for a long time.
use dual boot grub of ubuntu with windows xp : sometimes, I had some successes but failures were more. Windows used failed to boot and I had to reinstall. Every reinstall of windows ate the grub in my dev/sda, owing to intolerance of windows towards other operating systems. As re- and re- installations of Ubuntu were easier than windows, I re- and re- installed Ubuntu.
Reinstallations of Ubuntu were resulting in loss of many packages I got using apt-get install commands, getting deb files, and configuring tar files.
Recently, it seems that Ubuntu stopped supporting updates for 10.10 version. It also seems that they withdrew support for some repositories, which we could include with the command add-apt-repository ppa:., or by gediting source.list file.
Consequently, I found that it is frustrating to install packages like aptitude, gparted and filezilla or gftp. Downloading dependencies seems to be a heavy and costly affair. For example, for sudo apt-get install of gpartem, I get a command line reply message of needing to download 398 mbs of dependencies for the installation.
The same is the case with filezilla. Though, I downloaded the tar (zip in windows lingo) files of filezilla, and tried to configure and make files, I got error messages of missing dependencies.
I learnt over internet, that Nautilus file Manager, available with Ubuntu, by default is very useful.
Steps for using Nautilus:
Places. Desktop option. Desktop folder will appear. File Menu. Connect to Server option. Various choices appear. We type the ftp address, user-name, and password if any for logging into the ftp server (our host). When our root directory appears, uploading of files will only be a drag and drop / copy-paste affair.
Though Nautilus file manager, may miss some of the extra functionalities of filezilla, by and large it serves our purpose.

Added on 24th August 2013.

After working for several months with nautilus, I have come to a reasonable conclusion that it is better than filezilla. Though filezilla is free, Nautilus is more convenient because it comes free and as DEFAULT with ubuntu (I use ubuntu 10.10). Whenever we format and reinstall or reinstall ubuntu, we need not worry about getting filezilla.