Ecommerce, SEO, Gadgets, Mac und Internet Themen

Daily Tip: How to Turn on Maintenance Mode in WordPress – WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org

Kategorie: Allgemein

This snippet comes to you courtesy of wp-snippets.com, a great new source for helpful WordPress hacks. When you add this snippet it will shut down your site for anyone who is not the admin. When you want the site to return to normal, simply remove the function and you’re back in business

via Daily Tip: How to Turn on Maintenance Mode in WordPress – WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org.

WordPress Wartungsmodus Wartung

Safari Only CSS Styles

Kategorie: web-development

Styles, auf die ausschließlich der Safari (Webkit) hört kann man mit:

@media screen
   and (-webkit-min-device-pixel-ratio:0)
{
	#id1 {margin: xx px;}
	.class1 {margin-bottom: xx px;}
}

definieren.

Den Browser per jQuery erkennen

Kategorie: web-development

Per CSS lässt sich nur der IE erkennen, alle anderen bleiben nur “alle Anderen”. Mit Hilfe von jQuery lassen sich jedoch alle Browserfamilien separat erkennen:

für den Quellcode / Source gehts hier lang

Browserswitch — zwischen IE und FF unterscheiden

Kategorie: web-development

Die Lösung heißt: conditional comments

Normal comment: <!-- Comment text -->
Conditional comment: <!--[If expression]> HTML <![endif]-->

Für den einfachsten Switch bedeutet dies:
<!--[If IE]> HTML <![endif]-->
Hier wird jeder IE (ab v5) den eingeklammerten HTML code ausführen

Die umgekehrte Richtung geht leider nur mit einem nicht XHTML validen code, nämlich:
<!--[if !IE]><!--> HTML <!--<![endif]-->

Das Ganze geht auch komplexer:

  • ! (negation)
    Use the negation to select all versions except the one specified, e.g.
    [If !IE 6] will select IE 5, 5.5 and 7.
  • lt (less than)
    Select any versions less than the one specified, e.g. [If lt IE 6] will select IE 5 and 5.5.
  • lte (less than or equal)
    e.g. [If lte IE 6] will select IE 5, 5.5 and 6.
  • gt (greater than)
    Select any versions greater than the one specified, e.g. [If gt IE 6] will select IE 7 (and any later versions that may appear).
  • gte (greater than or equal)
    e.g. [If gte IE 6] will select IE 6 and 7 (and later).

Für weitere Informationen [Quelle]
Weiterlesen: Browserswitch — zwischen IE und FF unterscheiden »


wpSEO optimiert Blogs für Suchmaschinen - automatisch und effizient.
Viktor Dite Mizine on Twitter Viktor Dite on Google+