CSS, short for Cascading Style Sheets, is a language used to control the presentation (including colors, layout, and fonts) of HTML and XHTML documents.

learn more… | top users | synonyms (4)

54
votes
5answers
13k views

How bad is it to use display: none in CSS?

I've heard many times that it's bad to use display: none for SEO reasons, as it could be an attempt to push in irrelevant popular keywords. A few questions: Is that still received wisdom? Does it ...
40
votes
7answers
7k views

Why should we use tags like p, span, hx tags when we can use CSS instead?

Why should we use tags like p, span, hx tags when we can use CSS instead? Is it important from an SEO point of view?
36
votes
4answers
6k views

Why do big sites host their images/css on external domains?

Why do big sites (Facebook, Twitter, Google, Tumblr & so on) host their images/css on external domains? Facebook: http://static.ak.fbcdn.net/ Twitter: http://a0.twimg.com Google: ...
33
votes
5answers
3k views

Why aren't we supposed to use <table> in a design?

What are some clear and logical reasons for why we shouldn't be designing websites with tables? Where are the benefits, what has been driving this idea in the industry? When is it okay to use a table? ...
22
votes
4answers
2k views

Why insert static files (CSS, images, JavaScript, ECC) in a subdomain?

Why so many big and little sites inserts static files (CSS, images, JavaScript, ECC) in a subdomain like media.example.com or s2.static.example.com? What are the advantages? Why not just a directory ...
21
votes
10answers
1k views

What is new in HTML5/CSS3?

I've seen this site and this site, but that's a lot to digest. What are the main things about HTML5 that make it different/better than regular old (X)HTML/CSS?
18
votes
5answers
2k views

Remembering CSS left, top, right, bottom

When using CSS what little tricks have you done to remember (perhaps a saying?) the order of left, top, right, bottom when defining combined CSS attributes such as border, margin and padding. I'm ...
18
votes
5answers
463 views

What documentation exists for HTML, CSS, and JavaScript?

PHP users have the PHP.net docs Ruby users have Ruby-Doc.org Python users have docs.python.org jQuery users have docs.jquery.com All are considered go-to references when working within those ...
18
votes
11answers
9k views

Are HTML tables bad for SEO?

A lot of designers discourage the use of tables but I have a layout where I'll use more div structure to achieve something made simple with a table.. Are tables bad for search engines? edit: I will ...
17
votes
4answers
21k views

Is the Bootstrap CSS on a CDN yet?

Just checking to see if anyone knows of a CDN for the bootstrap css framework.
16
votes
6answers
11k views

Is there a tool that converts css to less.css?

I have a pretty big CSS file, that I want to convert to less. When I wrote the CSS I did not know less.css, but now I still want to use my old CSS. Is there a tool that can help me to convert it ...
16
votes
4answers
9k views

Is there a way to compile LESS files to CSS (so that every browser doesn't have to)?

I'm considering using LESS but I cringe at the thought of a browser having JavaScript disabled and my CSS not being readable (and the site looking awful). Also, it offends the engineer in me to force ...
16
votes
4answers
35k views

How do I set expiration headers for CSS, JS, and Images?

I have recently analysed my website with pagespeed addon on firebug. It suggested me to set expiration on CSS, JS and image files. I am wondering how do i do this?
16
votes
4answers
7k views

How can I find unused/unapplied CSS rules in a stylesheet?

I've got a huge CSS file and an HTML file. I'd like to find out which rules are not used while displaying a HTML file. Are there tools for this? The CSS file has evolved over few years and from what ...
14
votes
8answers
3k views

Should I use HTML5 and/or CSS3 to build my website?

The new HTML5/CSS3 (Web8!) stuff sounds cool! Should I start using it now or stick with css/xhtml wait until more browsers can use it?
14
votes
4answers
13k views

How to pre-load images used only on hover?

I have a link that starts with one background image and then changes on hover to another. Both background images are set in the CSS. My browsers (any of them) don't seem to load the hover image ...
14
votes
7answers
2k views

What should I use to automatically combine css/js files?

I'm aware of sprockets for combining javascript files, but haven't tried it. What are some other options and how do they stack up?
14
votes
1answer
5k views

How Google reacts on display:none for CSS media query?

According to Google Webmaster guideline "Hidden text" is not acceptable. Which means I do have a dov containing some good amount of title or paragraph with link or images if I make it display:none in ...
13
votes
4answers
3k views

Are CSS sprites bad for SEO?

Nowadays often what was accomplished with an <img> tag is now done with something like a <div> with a CSS background image set using a CSS 'sprite' and an offset. I was wondering what ...
13
votes
7answers
2k views

Should I split a large CSS media queries file into separate files for each screen size?

I am working on a responsive design website to deliver content for all screen sizes. I have media queries for 5 different "steps", and the CSS file is around 30 Kb. Would it be better to split this ...
12
votes
3answers
2k views

Can CSS be copyrighted?

I know CSS on a website is protected under the website's copyright since it is considered part of the overall design. I also know that images used in CSS are copyrightable. How about when CSS is used ...
11
votes
3answers
1k views

Robots.txt - CSS allow or disallow

Are CSS and templates allowed in robots.txt? Should it cause any problems? In Joomla, CSS and templates are disallowed in the robots.txt. Please help me find a solution to whether or not put ...
11
votes
5answers
2k views

Is it OK to use jQuery for responsive web design?

I have been tasked to update a site to make it responsive and appear correctly on smart phones. Unfortunately, the site in its current form isn't very easy to work with - I can't just change the CSS. ...
11
votes
6answers
1k views

How can I encourage the browser to download images from CSS file faster?

I use CSS to place a lot of my images (as backgrounds for <div>) and I often find that they load very slowly this way. They seem to be the last thing to load. Even small little icon images ...
11
votes
1answer
571 views

How to make a printer-friendly version of a webpage?

What solutions or techniques exist for offering users a printer-friendly versions of a webpage?
11
votes
4answers
3k views

Should I combine js/css files into a single file?

Both YSlow and Google's Page Speed add-ons recommend combining script (and style) files into a single file each to reduce the number of HTTP requests, and I can certainly see the point of this when ...
11
votes
1answer
824 views

Refactoring large/old CSS files

I'm currently working on a 100,000 page website, the current design has been in place for over 5 years and successive updates have resulted in four 12,000+ line CSS files. Obviously the CSS has ...
11
votes
8answers
3k views

CSS style viewer/tester

Is there a site out there that has a bunch of typical html for seeing what the css looks like once applied? I mean, something full of table, a, div, span, p, whatever. You go there, paste in your ...
11
votes
1answer
2k views

Is this inline-block trick involving 'font-size: 0' dangerous for SEO?

A while back, I answered this question on Stack Overflow: http://stackoverflow.com/questions/5078239/how-to-remove-the-space-between-inline-block-elements The problem is that elements with display: ...
10
votes
4answers
3k views

Do CSS class names have any effect on SEO? [duplicate]

Possible Duplicate: Is minifying id and class names a bad SEO practice? I have seen some of our competitors using keyword rich CSS class names. As an example, if I were in the pet grooming ...
10
votes
5answers
209 views

What new cross-browser features can we use if we drop support for IE6?

My company is dropping support of IE6 and I just realize that we can use a set of great features. Is there a list of CSS, Javascript features which we can use with IE6 RIP?
10
votes
7answers
24k views

Font displays differently in Firefox vs. Chrome

It seems that my menu bar is displayed with a different font stretch in Firefox than it is in Chrome. See the following: Here is the CSS applied to this element: font-variant: small-caps; ...
10
votes
2answers
354 views

Communicating image size, best practice

If you are developing a html document strictly using current best practice of keeping styling out of the markup how do you best communicate image sizing? Past best practice wants image height and ...
10
votes
4answers
10k views

How do you save/export changes made in Firebug?

Using Firebug to edit CSS, how do I save/export changes made to the CSS? TOOLS: Firefox, Firebug MAJOR UPDATE: If you know of a way to lock the forward/back/refresh on a FireFox tab, please let me ...
10
votes
5answers
6k views

is 'bookman old style' web safe

Is 'Bookman Old Style' web safe? If not, is there something that looks similar which is web safer?
10
votes
4answers
473 views

How to go about unused CSS issues

I am running some speedtests on a blog, and I always get complaints about unused CSS. But this is not CSS that I never use, it is just not used on that particular page. Now I work in a structured ...
10
votes
6answers
3k views

What's the best way to show a message for only IE 6 and IE 7?

What's the best way to show a text message for only IE 6 and IE 7 ? Should I add a html tag to my webpages and normally hide it with css for all browsers except the above mentioned ? And when I use ...
10
votes
7answers
339 views

As a non-designer what are some good sites/books/tutorials for learning web design?

My graphics skills are seriously lacking. I can see when something looks nice and when it doesn't but have a hard time coming up with anything myself given a blank slate. What should I do?
10
votes
2answers
342 views

How to identlfy unused css selectors and rules for css pages which cover multiple pages and are installed locally?

I'm looking for a tool which would be able to identify unused and/or duplicate css selectors and rules, with the following two restrictions: The tool would have to be able to analyze css pages which ...
10
votes
2answers
194 views

Automated Website Testing/Sanity/Quality

I am thinking about building a tool that starts from the root of a webpage and traverses the entire website gathering a list of resources such as CSS/HTML/Javascript files and then runs CSS/Javascript ...
9
votes
3answers
6k views

iPad and iPhone browser rotating images on site?

I am experiencing an odd occurance on a site I'm building right now where images are displayed 90 degrees different from how they are supposed to, but while maintaining the normal dimensions of the ...
8
votes
3answers
317 views

What font technique is being used here?

While I was attending this event (http://worldtour.fogcreek.com/) I noticed this page had custom fonts for the Address part in the top left corner (i.e "Fog Creek Software 55 Broadway Fl 55....") When ...
8
votes
9answers
437 views

How do I compress my JavaScript and/or CSS?

I know that there are ways to dynamically load it into the page, but if I want to compress my code so it loads even faster, how do I do it?
8
votes
7answers
1k views

Can anyone list some real examples of 'HTML5' being used in the wild?

I am using HTML5 in the same way everyone seems to be using it these days, meaning: HTML5 tags, Canvas / 3D / javascript and CSS3. I am struggling to find examples of sites that are using these ...
8
votes
8answers
257 views

CSS reduction for faster loading / less bandwidth

Is compacting CSS / Removing unused rules for a specific page worthwhile in terms of bandwidth or can we rely on caching (headers/last-modified) to remove this overhead in the wild? Cheers Also, ...
8
votes
2answers
196 views

What are the basic things to do in order to make a web site iPhone-friendly or more mobile-accessible?

What are the basic things to do in order to make a web site iPhone-friendly or more mobile-accessible in general?
8
votes
3answers
2k views

Directory structure for a website (js/css/img folders)

For years I've been using the following directory structure for my websites: <root> ->js ->jquery.js ->tooltip.js ->someplugin.js ->css ->styles.css ...
8
votes
1answer
196 views

Improve web site performance via parallel CSS downloads?

I was optimizing the page load time of a website. One of the ways was by combining multiple HTTP requests for CSS into one combined HTTP request. But one of the reviewers asked an interesting ...
8
votes
1answer
1k views

Unknown CSS font-family oddity with IE7-10 on Windows Vista, 7, 8

I am seeing the following "oddity" with IE7-10 on Windows Vista, 7, 8: When declaring font-family: serif; I am seeing an old bitmapped serif font that I can't identify (see screenshot below) instead ...
8
votes
4answers
2k views

Is there anything wrong with targeting the alt attribute in css?

I tried targeting the the alt attribute in css. My solution worked in Firefox/Mozilla, but fails in Safari-Chrome/Webkit. Is there anything wrong with styling an alt tag? If not, how do you suppose I ...