Kompx.com or Compmiscellanea.com

CSS centering <hr />

Windows : Internet Explorer 4.01 and 8.0+, Firefox 1.0+, Google Chrome, Opera 3.5 - 4.0 and 7.0+, Safari 3.1+, SeaMonkey 1.0+ [ 1 ].

Linux : Firefox 1.0+, Google Chrome / Chromium, Opera 7.0+, SeaMonkey 1.0+ [ 2 ], NetSurf 3.0+, Hv3.

CSS centering <hr />, if its width is less than 100%. Horizontal centering. Example:


HTML / XHTML. Code:

<hr />

CSS. Code:

hr {width: 50%; margin: 0 25% 0 25%;}

/* Extra CSS, just styling the look: */

hr {height: 1px; float: left; border: 0px; color: #f00; background: #f00;}

Note: mostly it works both with float: left and float: none. But float: left makes it for sure.


[ 1 ]

As well as Netscape 4.04+, Mozilla 0.6+.

[ 2 ]

As well as Netscape 4.04+, Mozilla 0.6+.


Aliosque subditos et thema

 

JavaScript + CSS centering

 

Centering content of a web page by means of JavaScript and CSS. A block containing the content of a page is JavaScript + CSS centered horizontally and vertically. Two cases: 1. A block is centered, if screen resolution is equal to or greater than 1024x768 - [ Open demo page ] 2. A block is centered, if screen resolution is equal to or greater than 1024x768 + mouse cursor is moved over a link in an element of the page content - [ Open demo page ] JavaScript and CSS horizontal and vertical centering. The first case. Step by step. 1. A web page, the part of which is going to be the element the JavaScript + CSS horizontal and vertical centering is to be applied to: HTML / XHTML. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>JavaScript + CSS horizontal and vertical centering. The first case. Step 1</title> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /> <link rel="stylesheet" type="text/css" href="1.css" /> </head> <body>   </body> </html> CSS. Code: html {height: 100%; margin: 0px;} body {background-color: #fff; margin: 0px; height: 100%;} 2. A block element A (grey color) with dimensions declared explicitly, for instance 800 by 500 pixels and with relative positioning is created in the document's body. [ Open demo page ] HTML / XHTML. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>JavaScript + CSS horizontal and vertical centering. The first case. Step 2</title> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /> <link rel="stylesheet" type="text/css" href="2.css" /> </head> <body> <div class="element_A">&nbsp;</div> </body> </html> CSS.

Imapsync IMAP migration under Windows

 

Migrating an IMAP e-mail box from one IMAP server to another under Windows [ 1 ] [ 2 ] by means of imapsync: Copying an e-mail box with all its contents and keeping its folder structure; The e-mail box is hosted at a web hosting company's server and transfered to a common Yandex Mail (not Yandex Mail for Domain); Both IMAP servers support SSL. The process is done in three steps: test run, migrating folder structure, migrating e-mails. Test run Content of imapsync-test.bat: .\imapsync.exe ^ --host1 imap.domain.ru --user1 email1@domain.ru --password1 "password1" ^ --host2 imap.yandex.ru --user2 email2@yandex.ru --password2 "password2" ^ --ssl1 --ssl2 --sslargs1 SSL_verify_mode=0 --sslargs2 SSL_verify_mode=1 ^ --skipheader "^(?!Message-Id)" ^ --automap ^ --regextrans2 "s/^INBOX\.(.+)/$1/" ^ --addheader ^ --justfolders ^ --dry @PAUSE Note: the caret character ( ^ ) at the end of line means "this command continues on the next line". It allows to break long command with many options into several parts to put them in several lines for better readability. This step is meant for testing if imapsync may be run at all, if it can connect to both e-mail boxes and can read the basic structure of the first one. Imapsync runs without actually doing anything, just printing what would have been done without the --dry option. Adding --justfolders is to make testing faster, as imapsync does its job only for folders then. A log file with full details for each run is placed into the LOG_imapsync folder. Migrating folder structure Content of imapsync-folders.bat: .\imapsync.exe ^ --host1 imap.domain.ru --user1 email1@domain.ru --password1 "password1" ^ --host2 imap.yandex.ru --user2 email2@yandex.ru --password2 "password2" ^ --ssl1 --ssl2 --sslargs1 SSL_verify_mode=0 --sslargs2 SSL_verify_mode=1 ^ --skipheader "^(?!Message-Id)" ^ --automap ^ --regextrans2 "s/^INBOX\.(.+)/$1/" ^ --addheader ^ --justfolders @PAUSE This step reproduces the folder structure of the e-mail box being migrated in the one it is being migrated to. Migrating e-mails Content of imapsync-emails.bat: .\imapsync.exe ^ --host1 imap.domain.ru --user1 email1@domain.ru --password1 "password1" ^ --host2 imap.yandex.ru --user2 email2@yandex.ru --password2 "password2" ^ --ssl1 --ssl2 --sslargs1 SSL_verify_mode=0 --sslargs2 SSL_verify_mode=1 ^ --skipheader "^(?!Message-Id)" ^ --automap ^ --regextrans2 "s/^INBOX\.(.+)/$1/" ^ --addheader @PAUSE Now e-mails are being copied.