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

 

Renaming files in mc

 

Renaming a file in mc / Midnight Commander: - Select a file --> Shift - F6 --> Edit existing file name into a new one --> Enter Select a file Edit file name The original way of renaming a file - the one mc / Midnight Commander had before "Shift - F6" was implemented - is also still there: - Select a file --> F6 --> Enter a new file name --> Enter Select a file Enter file name And "Esc - 6" may be used instead of "F6": - Select a file --> Esc - 6 --> Enter a new file name --> Enter Select a file Enter file name

CSS centering absolutely positioned elements

 

CSS horizontal centering of an absolutely positioned element. Example: HTML / XHTML. Code: <div class="example"> <img src="image.jpg" alt="Image" /> </div> CSS. Code: .example {position: relative; left: 0px; top: 0px; height: 90px; width: 100%; float: left; padding: 10px; border: 1px #ccc solid; background: #fafafa; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box;} .example img {position: absolute; left: 0px; right: 0px; margin: 0px auto; width: 68px;} An absolutely positioned img is centered in the example. But this method of horizontal centering also works with other both inline and block absolutely positioned elements. The width of an absolutely positioned element may also be in percent or other units. CSS properties of a container (here it is .example), holding an element to be centered, may vary. The element's centering is achieved by styles applied to the element itself: .example img {position: absolute; left: 0px; right: 0px; margin: 0px auto;}. [ 1 ] As well as Netscape 8.01+, Mozilla 1.5+. [ 2 ] As well as Netscape 8.01+, Mozilla 1.5+.