css3

CSS, Styling the Parent/Root but not the children? W/O creating sloppy CSS

So this is new, I'm trying to create clean CSS, here's my code example: <ul id="Main"> <li>blah blah</li> <li>blah blah</li> <li>blah blah</li> <li> <ul> <li>ding dong</li> <li>ding dong</li> <li>ding dong</li> </ul> </li> </ul> Then I have the following CSS: #Main li { background-color:Red; } Probl...

Image vertical align with css - strange

I have the following code: <html> <head> <style type="text/css"> #test img {vertical-align: middle;} div#test { border: 1px solid green; height: 150px; line-height: 150px; text-align: center; color: white } </style> </head> <body> <div id="test">t<img class="bottom" src="http://www.w3schools.com/css/w3schools_logo.gif" alt="W3School...

How do I style a table like a notepad?

I would like to create a CSS/HTML version of this notepad on my page: I was thinking of using a simple table like this: <div id="notepad"> <table> <thead id="tbl_header">Comments</thead> <tr></tr> <tr> <td class="col1">Dot</td> <td class="col2">Text for...

How to create a simple article design with CSS and HTML5

I'm trying to create the following design: This is my code so far. <section class="frontpagearticle"> <figure class="frontpagearticlefigure"> <img class="frontpagearticleimg" /> </figure> <header> <h2 class="frontpagearticleh2">MyHeader</h2><time class="frontpagearticletime">pubtime</time> </heade...

Which browsers still support CSS expressions

From a blog: The basic idea with CSS expressions is that you will have calculation and dynamic values for properties in the CSS code, something that people have found very useful. A simple example can be implementing max-width behavior in IE 6: width: expression(document.body.clientWidth > 1100)? "1100px" : "auto...

Flip a div back to front with webkit transform CSS3

I know it sounds a bit weird but can you flip a div back to front with -webkit-trasnform? For example imagine a show window with writing on but you are looking at it from the inside so the writing is back to front. ...

CSS Last-Child Selector - affecting all my DIVs?

I have the following CSS .streamBox { font-size:12px; background-color:#EDEFF4; border-bottom:1px solid #E5EAF1; margin-top:2px; padding:5px 5px 4px; } .streamBox:last-child { border: none; } HTML <ul id="activityStream"> <li class="story"> <div class="streamBox nobkgcolor" id=""> Stuff </div> </li> <li class="sto...

Video element jumping in CSS3 multi column layout

Im using a CSS3 multi column layout on my website with in the second column a video element. This works fine in Chrome and Firefox, but in Safari the video jumps to below the columns. Can i fix this and why does it happen? Thanks a lot! ...

How can I support border-radius on all major web browsers?

There doesn't seem to be a way to support border-radius other than to provide the CSS for each engine separately. Right now it seems you have to declare the property three or four times (possibly more if you want to support more obscure engines). My interim solution is to pass all of my CSS through this regular expression: Regexp: bor...

Can I apply webkit-gradient to a border or just background?

So I would like to make the border faded. I have the exact webkit-gradient settings that I want. But not sure how to implement it on the border element. Is it possible? How do I do that? Only CSS3 please. Btw, I tried the following CSS and it didn't work: border-color: -webkit-gradient( linear, left bottom, left top, color-stop(0.74...

Add gradient to select box w/ CSS3 in chrome?

I'm try to render a gradient background on some form elements. While it works fine for text and text areas, the same does not seem to work for selects in Chrome/Safari (though it does work on FF3) . Is there a way to accomplish this? CSS code: .prettyform input, .prettyform textarea, .prettyform select { padding: 9p...

css3 div 'pulse'

how does one make a div/input flash or 'pulse' say for example a form field has an invalid value entered? ...

Trying to get vertical text to bottom align

The layout I'm trying to achieve is shown in this image: The HTML below is one of many attempts which haven't worked. The project this is for is targeting HTML5 in the latest browsers only, so there is no need for it to work in anything except the latest Chrome, Safari, Firefox and (with a following wind) IE9 beta. <!DOCTYPE html> <h...

Firefox won't render fonts

So firefox doesn't want to load my fonts, the path is right I also so the request in Firebug, but it won't render it. On other browser it works perfect, here is my code: @font-face { font-family: 'Gill Sans'; src: url('/fonts/gillsansstd-webfont.eot'); src: local('☺'), url('/fonts/gillsansstd-webfont.woff') format('woff'), url('/fonts/g...

How to enable -webkit-animation/transition-property for :before and :after pseudo elements?

How to enable -webkit-animation for :before and :after pseudo elements? You can see in http://jsfiddle.net/4rnsx/ that it is not working for :before and :after. And here I am trying to enable this feature with Mootools http://jsfiddle.net/6bzCS/. Mozilla - will support it in Firefox 4 https://developer.mozilla.org/en/CSS/-moz-transit...

Pure CSS3 rotateY flip with two sides

Hey all, So I was playing around with CSS3 and HTML5 on my page trying to keep up to date. I was playing with the rotateY setting of the new CSS transform and I was wondering if there was a way to flip something over that it has two different sides but using only CSS and HTML. I searched the Internet and didn't find any tutorials. Anyw...

Right-to-left when using webkit-column

Is there a way to get right-to-left scrolling/content when using -webkit-column? ...

Why should I use CSS3 buttons?

I built a website recently, and decided to create buttons that depress on click with CSS3, pretty cool. But is there really a valid reason to use CSS3 over a sprite, as only the modern browsers show the CSS3 buttons? The client asked me this question, and all I could think of was less http requests, so loading would be slightly faster...

How to divide a large text into multiple chunks, all with the same max-height?

CSS3's column-module allows you to divide your text into a multiple columns. Either by 1) specifying the column-height property (all columns will have the same author-defined height, the column count is dynamic) or, 2) specifying the column-count property (all columns have the same computer-generated height, the number of columns is ...

Best CSS buttons that are cross browser, degrade gracefully, and work on input or link

I have seen a lot of good attempts at CSS buttons (for example http://ubuwaits.github.com/css3-buttons/ ) But I haven't seen one emerge yet that is safe to use in production and meets all the following requirements: Looks good on all modern browsers Degrades gracefully on older browsers down to at least IE7 (bonus if IE6) - don't car...