This tutorial will cover a detail description about the capability of Attribute Selectors in CSS3. The attribute selectors target elements based on the presence of HTML attributes and/or it’s value and are declared using square brackets.
Tag » HTML
Descendant, Adjacent, Child, Sibling Combinators and Selectors
Coming into second part of Power CSS3 selectors, we will learn here about Descendant, Adjacent, Child, Sibling Combinators and Selectors that make our styling task lots easier.
1. X Y (Descendant Combinator)
2. X + Y (Adjacent Combinator)
3. X > Y (Child Combinator)
4. X ~ Y (Sibling Combinator)
Power CSS3 – universal, type, id and class selectors
CSS3 selectors actually select the content we want to style. Obviously a CSS selector is the part of a CSS rule set. Here we will be familiar with the power of basic CSS3 selectors:
1. * (universal selector)
2. X (type selector)
3. #X (id selector)
4. .X (class selector)
Make a HTML, CSS, JS try it yourself editor
Making a try it yourself editor is a very easy and 5 minutes task if you know the concept behind it. Here I’m telling you step by step to create a try it yourself editor like w3 schools that would be able to run your HTML, CSS and javascript code online and display the result in iframe.
Open popup from another popup in jQuery
I had popup working and I wanted to open popup from another popup where a link was placed inside first popup using jQuery. This kind of scenario is quite common.
Most probable example we see are login and register popup boxes where one can toggle to login/register popup box through a link given in currently opened popup.
update div top position based on its changing height
Few days ago, I have a requirement to update Div top position based on its changing height. I tried to resolve it by using different way
Create depth border effect or deep border using lists in CSS
Someone asked me how do I create depth border effect or deep border using lists in CSS. Actually he wanted to create a strand effect (divider) between each list item as you can see in the screenshot below. You can see one more example using light background in rest of the article.
Show content on mouseover using CSS
With powerful features of CSS we can show content on mouseover using CSS and we don’t need javascript. Here I have provided two examples, first contains no transition and second has CSS transition effect while hovering. You can see these examples in demo.
Removing whitespace between HTML elements
Sometimes we get undesirable gap between HTML element that create unwanted behaviour of element as a result. Fortunately, removing whitespace between HTML elements is not so hard. In this article we will discuss about some solutions to remove the space.
The top three solutions are dedicated as answer of the particular issue I have specified in this article. Later I have provided some general solutions that fit with other tags and elements like inline-blocked elements.
Vertically and Horizontally Center a Div
Here is a good solution to make vertically and horizontally center a div inside another div. We also discussed how to center a div in a div either horizontally or vertically later in this article.