Kompx.com or Compmiscellanea.com


Aliosque subditos et thema


CSS horizontal and vertical centering - 1


Centering the content of a web page in the viewable area of a browser by means of CSS. A box to contain the whole content of the page is CSS centered horizontally and vertically: [ Open demo page ] HTML / XHTML. Code: <!DOCTYPE html> <html> <head> <title>CSS horizontal and vertical centering - 1</title> <link rel="stylesheet" type="text/css" href="css.css" /> </head> <body> <div class="all"> <div class="wrapper"> <div class="pagecontent">&nbsp;</div> </div> </div> </body> </html> CSS. Code: html {height: 100%; margin: 0px;} body height: 100%; margin: 0px;} .all {position: relative; left: 0px; top: 0px; height: 100%; width: 100%; float: left; display: table;} .wrapper {position: relative; left: 0px; top: 0px; height: auto; width: 100%; display: table-cell; vertical-align: middle;} .pagecontent {position: relative; left: 0px; top: 0px; height: 500px; width: 800px; margin: 0 auto; background: #ff6f6f;} The .pagecontent box is for the page content. It may be of height assigned explicitly or just "height: auto". Unlike CSS horizontal and vertical centering - 2, here percents may also be used as CSS units; not just px's or em's. Height and width may be larger than web browser viewable area, but here the more practical case is discussed - when the height and width of .pagecontent are smaller than those of the web browser viewable area. The .pagecontent box is horizontally centered by its "margin: 0 auto". .All with its CSS properties makes the whole web browser viewable area into a CSS table. CSS properties makes .wrapper into the cell of this CSS table. The content of this CSS table cell - the .pagecontent box with everything inside it - is vertically centered in the viewable area of a browser by "vertical-align: middle". [ 1 ] As well as Netscape 7.2+, Mozilla 1.5+. [ 2 ] As well as Netscape 7.2+, Mozilla 1.5+.



FTP in DOS. mTCP mTCP is a suite containing several utilities, one of which is FTP. It is similar to the FTP client of various Windows, running in Command Prompt. In order to install and use mTCP: 1. mTCP [ Home page ] 2. Packet driver for Ethernet network card: http://www.crynwr.com/drivers/ http://www.georgpotthast.de/sioux/packet.htm 3. Create a folder, for example C:\DRIVERS\. Put there: a packet driver for Ethernet network card. 4. Set up network. For example, by means of Microsoft Network Client 3.0 [ How-to page ] 5. Start packet driver. In the case discussed it is: C:\DRIVERS\PCIPKT.COM 0x60 6. Unpack the archive with mTCP into a folder, C:\SOFT\MTCP for instance, and create a tcp.cfg file in it with the strings: PACKETINT 0x60 HOSTNAME FTP_IN_DOS The value of PACKETINT - the interrupt number used in the packet driver starting. The value of HOSTNAME - any. 7. Start DHCP.EXE (DHCP will set up mTCP for work with the network): DHCP 8. Start FTP: FTP [ FTP address / host ] There will be a prompt for a name, after that - the password. Next, it is better to switch to passive mode: XFERMODE PASSIVE [ The list of the main commands supported by FTP of mTCP is available in ftp.txt, included in mTCP suite archive ] To exit: QUIT mTCP - GNU GPL v3.