CSS: content:”\00a0″

Today I came across a new CSS syntax that I have never seen before content:”\00a0″; Checking it on w3schools, it explains: Definition and Usage The content property is used with the :before and :after pseudo-elements, to insert generated content. My question is, can you point out to me in real world example, how do we … Read more

Multiple classes in CSS Selector

I see a selector like this, .class1 .class2 .class3 { } What does this mean? I’ve used multiple class selectors without spaces. Space means descendant but it doesn’t make sense for classes. Answer Let’s say there’s a page with the following markup, <div class=”class1″> <div class=”class2″> <div class=”class3″> Some page element(s). </div> </div> </div> The … Read more

CSS override rules and specificity

I’m often confused by CSS override rules: in general, I realize that more specific style-sheets override less specific ones, and that specificity is determined by how many selectors are specified. There’s also the !important keyword, which plays a role as well. So, here’s a simple example: I have a table with two table cells. The … Read more

What is the difference between push and offset under the grid system?

I’m trying to understand the difference between push and offset in Bootstrap grids. For example the only difference between the two rows below is the third column in each. One uses a push and the other uses an offset. However, they both render exactly the same. <div class=”row”> <div class=”col-md-2″> <h2>Column 1</h2> <p> This is … Read more

Can I style an image’s ALT text with CSS?

I have a dark blue page and when the image is loading (or missing) the ALT text is black and difficult to read (in FF). Could I style it (with CSS) to be white? Answer Setting the img tag color works img {color:#fff} http://jsfiddle.net/YEkAt/ body {background:#000022} img {color:#fff} <img src=”http://badsrc.com/blah” alt=”BLAH BLAH BLAH” /> AttributionSource … Read more

Is there a CSS selector for element without any class?

Is there a CSS selector for element without any class? For example in HTML <section>Section A</section> <section class=”special”>Section B</section> <section class=””>Section C</section> I would like to select Section A (or maybe Section A and Section C, it does not matter that much), by saying something like section:not(.*) { color: gray } I understand that I … Read more