background preloader

11design.de

Facebook Twitter

The SPAN and DIV HTML Tags. The SPAN and DIV HTML tags are very useful for use with Cascading Style Sheets. Many beginners use the two elements in a similar fashion, but they serve different purposes. Learn how to use these two elements effectively in your web pages. The DIV Element The DIV element defines logical divisions on your web page. It acts a lot like a P element, by placing newlines or carriage returns before and after the division. Using the DIV Tag To use the DIV element, surround the area of your page that you want as a separate division with the <div> and </div> tags: <div> <p>contents of div</p></div> If the area is unique on the page, you can add an id, e.g.

The DIV element allows you to define the style of entire sections of the HTML. The DIV element is different from the HTML5 SECTION element because it does not give the enclosed content any semantic meaning. If you need the element simply to add styles to that area of the page, you should use the DIV element. Learn More About the DIV Element. How to Center Text or Images with the DIV Tag and CSS. Centering elements using CSS and a DIV tag is easy. And once you've centered your text or images in this fashion, you'll know that it will be valid HTML. Plus, you avoid using deprecated tags and attributes like align and CENTER. This article is for beginning web developers and will help you learn how to use the DIV tag and CSS to center text and images on your pages. Difficulty: Easy Time Required: 2 minutes Here's How: Open the web page you want to update in your favorite text HTML editor.Find the elements you want to center on the page.

Tips: You can put your style in the DIV tag itself, or in a class in the head of the document. What You Need Text Editor. GMap Image Cutter. Latest update: Version 1.43 released 18 June 2014 Includes a template to use the Image Cutter with Google Maps API v3, fixes a bug with the batch creation in 1.42 and fixes a bug with the maximum zoom level in version 1.41. The GMap Image Cutter is an application designed to take any image or digital photo and cut it into tiles which are displayed on a Google Map. Using this tool, large images can be published on the web in a format that allows the user to pan and zoom using the standard Google Maps interface.

Although publishing large digital photos is the most obvious application, this technique can also be used for annotated maps of an area that are not to scale e.g. directions for how to get to the office. If you wish to use GMap Image Cutter software for other than academic or non-commercial personal purposes - including without limitation, on behalf of commercial or government organizations or entities - you must purchase a standard fee-bearing licence.

How It Works. Pixelgenaue Objekterkennung mit HTML5 Canvas als Hilfsmittel. Wenn wir uns im Netz bewegen bestehen alle Websites irgendwie aus Kästen. Alles ist in irgendeiner Art und Weise irgendwie rechteckig. Zwar geben uns neue CSS3-Techniken die Möglichkeit unsere Elemente abzurunden, aber dennoch: Sie sind Kästen. Wen man eine schöne (nicht rechteckige) Grafik anklickbar machen möchte – und zwar nicht den gesamten Kasten, in dem sie sich befindet, muss man zum Beispiel auf arbeitsintensive Image Maps oder Flash zurückgreifen. In diesem Artikel möchte ich euch zeigen, dass es mit Hilfe des Canvas-Elements aus HTML5 auch anders funktioniert. Das Element wird dabei nur als Hilfsmittel genutzt und nicht dazu, die Grafik einzubinden. Die Idee Die Idee stammt zugegebenermaßen nicht von mir selbst – die Umsetzung in diesem Artikel jedoch schon.

So lässt sich ein zweidimensionales Array aus Nullen und Einsen erstellen, mit Hilfe dessen man leicht entscheiden kann, ob die Maus sich auf oder neben dem Objekt befindet. Demonstration Link zur Live-Demo » Setup JavaScript. CSS Layers - CSS tutorial. With CSS, it is possible to work with layers: pieces of HTML that are placed on top of the regular page with pixel precision. The advantages of this are obvious - but once again Netscape has very limited support of CSS layers - and to top it off: the limited support it offers is quite often executed with failures.

So the real challenge when working with layers is to make them work on Netscape browsers as well. First look at this example: Second look at the code: To create a layer all you need to do is assign the position attribute to your style. The position can be either absolute or relative. The position itself is defined with the top and left properties. Finally, which layer is on top is defined with the z-index attribute.

You can either position your layer calculated from the upper left corner(absolute) or calculated from the position where the layer itself is inserted (relative). Both left and top properties can be dynamically changed with JavaScript. Picture a game of 52 cards. CSS Align - Align Content with CSS. Is there a CSS Align Property? : No, there is not a CSS align property. Many beginners, when starting out with CSS want it to have the same features as HTML. And HTML has an align attribute. But, while a CSS align property could be useful, CSS is more flexible than that. Instead of having just one CSS align property, CSS offers many different ways to align your page elements, depending upon how you want to align them and what type of elements they are.

Align Text with CSS: CSS aligns text in two ways: horizontally and vertically. You can align text horizontally to the left, center, right, or justified. You can align text vertically to the top, bottom, center, text top, text bottom, subscript, and superscript. Align Page Elements with CSS: But you can align more than just text with CSS. CSS uses the float property to align page elements.

The easiest way to think about the float property is to imagine that all your layout blocks are in a line in the HTML. Center Anything with CSS Alignments: Center with CSS - Center Images, Text, and Block-Elements - How to Center with CSS. Updated March 24, 2016. If you've ever had to build a webpage, you have likely needed to center something in that page. Using Cascading Style Sheets (CSS) is the proper way to center images, blocks of text, and even your entire layout for a Web page.

Most of the properties for centering have been in CSS since version 1.0, and they work great with CSS3 and modern Web browsers. Let's take a look at some different ways to use CSS to center certain elements in a Web page. On Overview of Using CSS to Center in HTML Centering with CSS can be a challenge for beginning Web designers because there are so many different ways to accomplish this, but not all techniques work on every element.

At a high level, you can use CSS to: Center textCenter a block-level element (like a division) continue reading below our video Play Video Center an imageVertically center a block or an image Centering Text with CSS The easiest thing to center on a webpage is text. <p class="center">This text is centered. Texte und Bilder ein- und ausblenden | esse est percipi. Auf der Website eines Kunden sollte das Navigationsmenü die Unterpunkte erst nach Klick auf die Hauptpunkte anzeigen. Es gibt einige Möglichkeiten, das umzusetzen, u.a. auch Frames. Ich gehöre aber der Internationalen Liga zur Ächtung von Framesets an, und deshalb habe ich eine einfache CSS/Javascript Lösung angewandt, die auch für viele andere Dinge eingesetzt werden kann – hier ein Beispiel: Versteckter Absatz… In diesen versteckten Absatz kann alles rein, was man nur auf Anforderung sehen soll – z.B.

Abbildungen von Illustratorinnen (Abb.: Jennifer Baule-Prinz), Erläuterungen, Auflösungen von Quizfragen, Zusatzinformationen, Einkaufslisten für Kochrezepte, Formulare etc. So funktioniert’s Der versteckte Absatz liegt in einem div, dessen Inhalt zwar geladen, aber mittels display:none erst mal nicht angezeigt wird. Die ganze Geschichte ist relativ unaufwändig zu implementieren. Und die Javascript Funktion, die zwischen display:none und display:block wechselt, sieht so aus: Kommentare: hi, Bilder übereinander legen. Make Things Fade In and Out with CSS3. One fun trick you can do with CSS3 is make your images and other elements fade in and out using the CSS3 properties: opacity and transition. This is a wonderful tool to make your pages more interactive by creating greyed out areas that come into focus when a reader does something.

The Basics: Change Opacity When Mouse Hovers Over The first thing you need to know how to do is change the opacity when a customer is hovering over an element. For my example I'm using an image with the class greydout: To make it greyed out, I add the CSS: Then, to make the image come clear when the mouse is over it, I add the :hover pseudo-class: As you can see on my examples page, this is very abrupt. So, to add the interim states, you want to add the transition property to the .greydout class: Here's an example of the image fading in, rather than just switching abruptly.

Fading Out is Possible Too Just like before, you change the opacity using the :hover selector: And here is how fading out looks. Browser Support. Stylesheets / CSS-Formate definieren / Stylesheets in HTML einbinden. Formate zentral für eine HTML-Datei definieren Sie können im head-Element einer HTML-Datei einen Bereich für CSS-Formate definieren. Beispiel: <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head><title>Das style-Element</title><style type="text/css"><!

Erläuterung: Mit <style... > ... MIME-Typ der Stylesheet-Sprache angeben. Zentrale Formate definieren. Beachten Sie: Damit ältere Web-Browser, die keine Stylesheets kennen, den Inhalt des style-Elements nicht irrtümlich als anzuzeigenden Text interpretieren, können Sie den Inhalt in einen HTML-Kommentar (<! Unterschiede zwischen XHTML und HTML. Formate, die Sie auf diese Weise definieren, sind für diese eine HTML-Datei gültig. Es ist durchaus erlaubt, mehrere style-Bereiche innerhalb des HTML-Dateikopfs zu notieren. Formate zentral in separater CSS-Datei definieren In vielen Fällen werden Sie einheitliche Formate für alle HTML-Dateien Ihres Projekts haben wollen. <! URIs notieren. Einbinden von Grafiken. zentraler Formate und Wie auch in <!

<! <!