Kompx.com or Compmiscellanea.com

CSS for a range of elements

Windows : Internet Explorer 9.0+, Firefox 1.5+, Google Chrome, Opera 9.5+, Safari 3.1+, SeaMonkey 1.0+.

Linux : Firefox 1.5+, Google Chrome / Chromium, Opera 9.5+, SeaMonkey 1.0+.

Styling a range of elements. Here from the 1st to the 3rd one - changing background color. Example:







CSS. Code:

div:nth-of-type(-n+3) {background: #f66;}

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

div {width: 100%; margin-top: 5px; background: #066;}

Note: nth-child may also be used instead.

Aliosque subditos et thema


Network setup in DOS. Microsoft Network Client 3.0


In order to install Microsoft Network Client 3.0 and set up network in DOS, there have to be several programs at hand: 1. Microsoft Network Client 3.0 [ Download ] 2. NDIS 2.0 driver for Ethernet network card. For example: Realtek RTL8029AS [ Download ]. Drivers for other network cards may be found, for instance, on web sites of Ethernet cards manufacturers. 3. If it is not MS-DOS 6.0+ to be used, QEMM97 [ Download ] Installing Microsoft Network Client 3.0 and setting up network in DOS, step by step: 1. Create a folder, for example C:\DRIVERS\. Put there: a NDIS 2.0 driver for Ethernet network card. 2. Prepare installation floppies of Microsoft Network Client 3.0: DSK3-1.EXE -d A: DSK3-2.EXE -d A: 3. Start setup.exe from the first floppy and begin Microsoft Network Client 3.0 installation. Installation is starting. Press Enter to continue Select folder for Microsoft Network Client 3.0 to be installed to. It may be any or the suggestion of the installer may be left as it is - in the case discussed it is left as it is. Enter Microsoft Network Client 3.0 installer examining the system files Select driver for Ethernet network card. If there is no right driver on the list, choose "*Network adapter not shown on list below ..." Enter This dialogue appears if there was no right driver on the proposed list of Ethernet network card drivers and "*Network adapter not shown on list below ..." has been selected. Specify the path to the folder containing the appropriate driver for the Ethernet network card. In the case discussed it is C:\DRIVERS\, typing it in. Enter Select driver from C:\DRIVERS\ folder specified in the previous step. In the case discussed it is RTL8029AS PCI Ethernet Adapter. Enter Choose to let or not to let Microsoft Network Client 3.0 use more RAM in its work to get the best performance. Any of the two choices is acceptable. For example - let it to. Enter Enter user name of up to 20 characters. It can contain Latin letters, numbers and characters listed. In the case discussed it is "net".

CSS centering floated elements


Centering an inline block containing several inline elements. The block is centered horizontally - [ Open demo page ]. Sometimes there is a need to have a centered group of floated elements, which is to serve as a title or a pagination box. Since this group of floated elements is going to be used as a title for content blocks of various dimensions or pagination box may grow or shrink in its size, then the width of the group of floated elements is to vary unpredictably as well. So a method of centering based on using a certain known width of the box is not going to work. And as an extra to the task there is a desirable condition: the title or pagination box has to be centered once and for all at the time of the box creation, so that this group of floated elements may be reused without any extra work over it: just place the complex where you need it and put the text or / and images you want to inside it - the group is centered anyway. This problem can be solved by several methods using several technologies: CSS, CSS + JavaScript, CSS + HTML (<table></table> tags system). The CSS centering floated elements is the most simple and reliable. So, here a pure CSS centering of floated elements is discussed. CSS centering floated elements: 1. First, a more simple case, css centering of a title box consisting of floated elements: images and text: 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>CSS centering floated elements: 1</title> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /> <link rel="stylesheet" type="text/css" href="css.css" /> </head> <body> <div class="box"> <span class="title-box"> <img src="snowflake.gif" width="37" height="34" alt="" class="title-imgs" /> <span class="title-text">CSS centering floated elements</span> <img src="snowflake.gif" width="37" height="34" alt="" class="title-imgs" /> </span> </div> </body> </html> CSS.