Questions tagged [css]

Cascading Style Sheets (CSS) is a language for specifying the layout and presentation in general of markup such as HTML and XML.

277 questions
294
votes
8 answers

Why are people making tables with divs?

In modern web development I'm coming across this pattern ever more often. It looks like this:
Vilx-
  • 5,320
  • 4
  • 20
  • 24
62
votes
5 answers

Why are large amounts of magic numbers acceptable in CSS and SVGs?

Often times I see questions on the Hot Network Questions list like this that basically ask "how do I draw this arbitrary shape in CSS". Invariably the answer is a couple of blocks of CSS or SVG data with a bunch of seemingly random hard-coded values…
44
votes
7 answers

How can I evaluate a candidate's knowledge of Html/CSS during an interview?

I am trying to determine some good interview questions to assess the ability of people coming in for a Html/CSS job, however that topic is extremely broad, and I'm not sure what sort of questions I can ask to properly evaluate someone's HTML/CSS…
webnoob
  • 2,139
  • 3
  • 19
  • 20
43
votes
7 answers

Why not embed styles/scripts in HTML instead of linking?

We concatenate CSS and JavaScript files to reduce the number of HTTP requests, which improves performance. The result is HTML like this:
GladstoneKeep
  • 2,629
  • 4
  • 19
  • 15
43
votes
7 answers

Referencing external javascript vs. hosting my own copy

Say I have a web app that uses jQuery. Is it better practice to host the necessary javascript files on my own servers along with my website files, or to reference them on jQuery's CDN (example: http://code.jquery.com/jquery-1.7.1.min.js)? I can see…
Mr. Jefferson
  • 1,361
  • 1
  • 11
  • 19
42
votes
8 answers

How do I get started with HTML5?

What is the recommended workflow to learn HTML5? What tools should I install? What SDK? Where to start? How to test? How to debug? What do I read? I understand that what is often labelled as "HTML5 development" is in fact a mixture of HTML, CSS, JS…
daniel.sedlacek
  • 902
  • 1
  • 10
  • 20
41
votes
6 answers

What's the right way to work with a graphic designer?

Recently, we worked with a graphic designer (arranged by the client) to provide the skin for a Django+Bootstrap application we had built. The designer provided a series of static images of the new layout, along with a document describing some…
Steve Bennett
  • 3,419
  • 4
  • 20
  • 24
38
votes
3 answers

Are there any advantages of SASS over LESS?

I'm trying to do research on these css preprocessors. Are there any advantages of using sass over less as a css preprocessor? Factors that i'm looking for include community size, software project maturity, etc. I know there was another question…
chrisjlee
  • 2,060
  • 4
  • 17
  • 19
36
votes
3 answers

Why does :nth-child() in CSS start from 1 instead of 0?

Why does :nth-child() iterate from one instead of zero? As shown in this example. Why does it select the first element and not the second when p :nth-child(1)
user51349
  • 477
  • 1
  • 4
  • 3
34
votes
3 answers

What makes BEM better than using a nestable style sheet language like LESS?

A colleague of mine is heavily pushing the BEM (Block Element Modifier) method for the CSS in a project he's helming, and I just cannot comprehend what makes it better than the LESS CSS we've been writing for years. He claims "higher performance",…
coredumperror
  • 443
  • 1
  • 4
  • 5
29
votes
5 answers

Tight Coupling Between Javascript, HTML, and CSS: A More Modern Approach?

It's very common to see Javascript bound to certain selectors to find elements, store data, and listen for events. It's also common to see these same selectors used for styling. jQuery (and its selector engine Sizzle) support and promote this by…
Stuart Kershaw
  • 351
  • 3
  • 9
28
votes
10 answers

Should I write HTML or CSS first?

There are a lot of analogies for HTML/CSS development; which can be a bit confusing for a beginner. HTML = foundations/house CSS = walls/blueprint/wallpaper Is there any best practice here? Which one should we write first?
Daniel
  • 393
  • 1
  • 3
  • 7
28
votes
6 answers

Practical considerations for HTML / CSS naming conventions (syntax)

Question: what are the practical considerations for the syntax in class and id values? Note that I'm not asking about the semantics, i.e. the actual words that are being used, as for example described in this blogpost. There are a lot of resources…
Jeroen
  • 523
  • 1
  • 6
  • 18
25
votes
2 answers

What alternatives are there to using HTML/CSS layouts for websites?

Is there any existing in-use, or even just conceptual attempts at creating a markup or programmatic expressions for designing the layouts of websites other than HTML/CSS? If there are others out there and they do not appear to be in heavy use. Why…
Incognito
  • 3,458
  • 2
  • 25
  • 38
25
votes
1 answer

The Box Model: Internet Explorer vs. W3C

Today, the Internet Explorer Box Model problem is mostly a non-issue. Most web developers place a tag to enforce standards compliance, and nobody really cares about supporting Internet Explorer 5.5 anymore. However, some developers have…
Channel72
  • 2,475
  • 5
  • 27
  • 28
1
2 3
18 19