Assignment GDB Solution: CSS

loading...

CSS Thinks to avoid

Here are some technologies you should try to avoid when using CSS. Internet Explorer Behaviors What is it? Internet Explorer 5 introduced behaviors. Behaviors are a way to add behaviors to HTML elements with the use of CSS styles. Why avoid it? The behavior attribute is only supported by Internet Explorer. What to use instead? […]

CSS Image Opacity / Transparency

CSS Image Opacity / Transparency Example 1 – Creating a Transparent Image First we will show you how to create a transparent image with CSS. Regular image: The same image with transparency: Look at the following source code: Firefox uses the property opacity:x for transparency, while IE uses filter:alpha(opacity=x). Tip: The CSS3 syntax for transparency is opacity:x. In […]

CSS Pseudo-elements

CSS Pseudo-elements CSS pseudo-elements are used to add special effects to some selectors. Syntax The syntax of pseudo-elements: selector:pseudo-element {property:value;} CSS classes can also be used with pseudo-elements: selector.class:pseudo-element {property:value;} The :first-line Pseudo-element The “first-line” pseudo-element is used to add a special style to the first line of a text. In the following example the […]

CSS Pseudo-classes

CSS Pseudo-classes CSS pseudo-classes are used to add special effects to some selectors. Syntax The syntax of pseudo-classes: selector:pseudo-class {property:value;} CSS classes can also be used with pseudo-classes: selector.class:pseudo-class {property:value;} Anchor Pseudo-classes Links can be displayed in different ways in a CSS-supporting browser: a:link {color:#FF0000;} /* unvisited link */ a:visited {color:#00FF00;} /* visited link */ […]