Kompx.com or Compmiscellanea.com

CSS vertical alignment

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

Linux : Firefox 1.0+, Google Chrome / Chromium, Opera 5.0+, SeaMonkey 1.0+ [ 2 ].

CSS vertical alignment of a block element containing text and images. It works for various combinations of inline and block elements. Example:

CSS vertical alignment

Image

CSS vertical alignment

HTML / XHTML. Code:

<div class="parent">

<div class="child">

<div class="childcontent">CSS vertical alignment</div>

<div class="childcontent"><img src="image.jpg" width="68" height="68" alt="Image" /></div>

<div class="childcontent">CSS vertical alignment</div>

</div>

</div>

CSS. Code:

.parent {position: relative; left: 0px; top: 0px; height: 200px; display: table;}

.child {position: relative; left: 0px; top: 0px; display: table-cell; vertical-align: middle;}

.childcontent {position: relative; left: 0px; top: 0px;}

Note: .parent and .childcontent may be floated left ("float: left;") or not, but .child must be without "float: left;" for this method of CSS vertical alignment to work.


[ 1 ]

As well as Netscape 6.01+, Mozilla 0.6+.

[ 2 ]

As well as Netscape 6.01+, Mozilla 0.6+.


Aliosque subditos et thema

 

Windows console applications. Web browsers

 

Lynx : Links : ELinks Text-based, or console web browsers are more typical for the Linux environment and other Unix-like systems. There the text-based web browsers were created, there is their main line of development. Very few (e.g., Wanna-Be / WannaBe for classic Mac OS) console web browsers were made originally for some other operating systems. And the text web browsers for Windows are the versions of console web browsers for *nix systems. Although those of them that do not work in the Cygwin environment have their little peculiarities. In former times text-based web browsers were an important tool for viewing web documents. With the development of GUI programs further in the dial-up era, text web browsers have been useful as the fastest way to view web documents and as a part of text-to-speech systems. The spread of broadband Internet and specialized soft for text-to-speech systems cut the scope of the console web browsers. All the more, most Windows users have always had a quite vague idea of their existence. However, text web browsers are highly specialized mature tools that may be useful in various situations using Windows. Lynx - / home page / Text-based web browser. Versions for Linux, FreeBSD, Mac OS X, some other *nix systems, DOS, Windows, BeOS, MINIX, QNX, AmigaOS, OpenVMS and classic Mac OS. HTML ( More 1 ) ( More 2 ). Lynx 2.8.5rel.1: lynx.isc.org Lynx 2.8.5rel.1: w3schools.com/browsers/browsers_stats.asp Lynx 2.8.5rel.1: en.wikipedia.org/wiki/Lynx_(web_browser) Lynx 2.8.5rel.1: ebay.com Lynx 2.8.5rel.1: kompx.com/en/web-browsers-for-dos.htm Lynx 2.8.5rel.1: twitter.com Links - / home page / Text-based web browser. Versions for Linux, FreeBSD, Mac OS X, some other *nix systems, BeOS, Haiku, OS/2, DOS, Windows.

CSS centering

 

1 ) CSS horizontal and vertical centering - 1 Centering a container with the whole content of a web page inside in the viewable area of a web browser by means of CSS. A box to contain the whole content of the page is CSS centered horizontally and vertically. More for modern web browsers : [ More ] : [ Open demo page ] 2 ) CSS horizontal and vertical centering - 2 Centering a container with the whole content of a web page inside in the viewable area of a web browser by means of CSS. A box to contain the whole content of the page is CSS centered horizontally and vertically. More conservative, than the previous method. Suitable not only for modern web browsers, but for older ones as well - like Internet Explorer 6 or earlier Maxthon. A shortcoming - it takes more efforts to maintain the CSS code compared to [ CSS horizontal and vertical centering - 1 ] method : [ More ] : [ Open demo page ] 3 ) CSS centering floated elements Floated elements of unknown width are CSS centered horizontally : [ More ] : [ Open demo page ] 4 ) CSS centering absolutely positioned elements CSS horizontal centering of an absolutely positioned element : [ More ] 5 ) CSS centering image CSS horizontal centering of an image : [ More ] 6 ) CSS vertical alignment CSS vertical alignment of a block element containing text and images. The method works for various combinations of inline and block elements : [ More ] 7 ) 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 : [ More ] : 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 ]