Internet Explorer bug – duplicate characters

One of Internet Explorer versions 6 and 7 bugs, consists in repeating (duplicating) some characters from the end of some elements with the CSS atribute – float.

What’s triggering this bug:

  • Using HTML comments inserted between the elemens with the float attribute.
  • Hidden elements using display: none

Solutions to prevent the duplication of the characters:

Using conditional comments:

<!--[if !IE]> comments here <![endif]-->

Another solution – you can set for the last element with float: left, the right margin at -3px (margin-right: -3px), and -3px for the left margin of the elements with float: right. Also you can set the width of the first div with 3px larger than the width of the last element with float.

How to create a simple shell script

Here is a simple example of creating and running (executing) a shell script. This script will display the numbers from 1 to 10.

Creating the script:

  • With any text editor (Gedit for Gnome, Kate for KDE, nano):
    #/bin/bash
    for ((i = 1; i <= 10; i ++))
    do
        echo $i
    done
  • Save it as myscript.sh.

Setting the execution rights:

Open a console, go to the directory where the script was saved and type:

chmod +x myscript.sh

Running the script:

  • In the console type:
    ./script.sh

    or

    sh script.sh

    The result should be like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

Diacritics in web pages

The usage of diacritics in web pages requires Unicode encoding.

In the head section of the page (between <head> and </head>) you need to insert this line:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Here is a list with the corresponding HTML codes of the romanian diacritics :