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

learn more… | top users | synonyms

0
votes
1answer
86 views

Using CSS for build tables. Are these tables okay to use for email? [on hold]

I am an newbie in training. Recently I read this an article about building tables with CSS. The code is something like this: <section style="display: table;"> <header style="display: ...
2
votes
2answers
219 views

Are there any reasons not to ever use classes or ids anymore?

I sort of understand unobtrusive javascript. Even in my CSS now I hardly ever use classes or id's because I like clean, easy to read, uncluttered html files. For example, why use this: <body ...
1
vote
2answers
116 views

Where to put css media queries in a CSS file?

Where to put CSS media queries? everyone after related element (class style) or gather them at the bottom of CSS file? which one is standard? or which one do you prefer?
6
votes
4answers
45k views

Is CSS a programming language? [duplicate]

Possible Duplicate: Why does it matter that HTML and CSS are not programming languages? As I understand a programming language is something that can be used to solve a problem/perform an ...
-2
votes
0answers
52 views

What are the differences of these Bootstrap frameworks with Angular 2? [closed]

I'm new to web development and I am starting a project with Angular 2 and I am looking at using Bootstrap for my UI framework. In the Angular 2 tutorial in the forms section they create a link to ...
5
votes
3answers
1k views

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 ...
57
votes
5answers
7k views

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 ...
0
votes
6answers
486 views

Should i expect real world questions from interviewing agency? [closed]

I started coding almost a year ago. By "coding" I mean HTML(5), CSS(3), and only few times I implemented some AJAX and JavaScript. I am interviewing for a position that expects me to know HTML, CSS, ...
12
votes
3answers
281 views

Providing Local JS and CSS Resources for CDN Fallbacks

Given that CDNs are a Good Thing because they can serve resources closer to the client, the client can cache them, and you can reduce load on your own server. In recent browsers, loading resources ...
2
votes
1answer
192 views

Why does nobody use indentation in css? [closed]

I find css quite hard to read sometimes. Indents, depending on the dom structure, would greatly increase readability. Consider the following example: #page { text-align:center; ...
2
votes
1answer
115 views

When making a change to a single table in our app, should we minimize the scope of our change, or follow best practice for css/jsp coding?

My co-worker has been assigned the task of editing one of our Java application's tables. She is almost done, but needs to make one final adjustment to the table - this requires her to add a CSS ...
2
votes
2answers
142 views

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)
0
votes
3answers
61 views

Overwriting Bootstrap CSS classes

We have an Angular JS app for which we use Bootstrap CSS. We are currently using pure Bootstrap with the default CSS files. However, we need to style the app in my companies corporate design sooner or ...
-5
votes
2answers
87 views

How do I make such a page that opens different link in web (PC) and different in mobile (phones)?

I am building a website that looks beautiful in Web but worst in mobiles. I want to build the same site but different designing for mobile. Whenever user opens site.com then it auto redirect to ...
2
votes
7answers
2k views

What to use instead of IDs in selectors in CSS

I recently installed a csslint package for my Atom text editor. I keep getting warnings saying "Don't use IDs in selectors." I found this weird since I've always been using IDs in selectors in CSS, ...
1
vote
1answer
135 views

What is the reason that CSS variables are defined using two hyphen characters (--)?

CSS variables supported natively it's a powerful feature to develop complex web apps without some additional step as preprocessors. So, this is fantastic. But (at first) the syntax of defining ...
10
votes
5answers
3k views

css - use universal '*' selector vs. html or body selector?

Applying styles to the body tag will be applied to the whole page, so body { font-family: Verdana } will be applied to the whole page. This could also be done with * {font-family: Verdana} ...
1
vote
1answer
300 views

Loading dynamic CSS based on user

I want to provide different UI theme based on user who logged in. For that I have came up with following 2 options: Create separate files for all themes duplicating all the common CSS. This way I ...
0
votes
2answers
51 views

PSD to HTML/CSS limitations when using Twitter Bootstrap

How do companies deal with limitations and constraints of Twitter Bootstrap after choosing to use it in a particular project? Web designers are no longer free to design Web pages. They need only to ...
8
votes
4answers
4k views

Why is it (or was it) important to separate CSS from HTML? [duplicate]

Intro I recently watched the slides from React: CSS in JS and I really like the idea of having CSS applied using JS (and with JSX, this would mean having all the HTML, JS and CSS in one file, which ...
3
votes
3answers
168 views

How is rendering a Word document different from rendering a website? [closed]

Now, it doesn't necessarily have to be Word — for ease of comparison, let's use ODT, which is based on XML — which is pretty similar to HTML. That would, to my mind, make rendering an ODT ...
1
vote
3answers
120 views

Linking stylesheets and scripts when using server side includes

I am working on a site where I want to have a header and footer on each page, so I thought about using server side includes for this. I have not used them before so I am a little bit unsure about best ...
1
vote
2answers
326 views

Do I need Bower for front end dependencies when I am already using composer?

I use composer for PHP dependencies. I was under the impression that for front end dependencies I should use Bower. So, I installed Bower and loaded my FE dependencies (Bootstrap, jQuery) using that. ...
1
vote
0answers
53 views

How can I properly classify elements?

I'm writing a webpage with a simple header, nav, body and footer layout. To style it, I wrote the following CSS: .mainSideBar { position: relative; display: inline-block; vertical-align: ...
5
votes
1answer
76 views

Finding the smallest sub-collection of sets that intersect to produce one element

I came up with a problem that's similar to the Set Cover problem but which I can't reduce down to any know problem. Does anyone have a good algorithm for solving this? Given a set of elements U = {1, ...
0
votes
1answer
128 views

How can I use a framework like Bootstrap when I already have designs from a design team [closed]

We are about to start an AngularJS project. In fact, the CMS will be AEM (Adobe Experience Manager). I'm now looking into the CSS/layout framework, and whether its worth using something like ...
0
votes
2answers
776 views

Selenium Testing w/ dynamically generated element id's: XPATH or CSS selectors?

Background: I'm an intern tasked with learning Selenium; my organization plans on having QA/Testing use it to simplify testing. We use JSF and WebSphere Application Server. One of the persistent ...
1
vote
1answer
1k views

Why use skins if we can handle server controls with CSS in ASP.Net?

The main difference between themes/skins and CSS are the HTML & Server Side Controls (SSC) only. We use skin files to format & cosmetics SSC which are not in HTML like <asp:Label>, ...
42
votes
8answers
6k views

How do I get started with HTML5? [closed]

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 ...
167
votes
8answers
58k views

Why are people making tables with divs?

In modern web development I'm coming across this pattern ever more often. It looks like this: <div class="table"> <div class="row"> <div class="cell"></div> ...
2
votes
2answers
132 views

Should a parent CSS class be added to the markup or @extended?

Reading SASS basic features on their website, I stumbled upon the @extend feature. The example they give is the following: .message { border: 1px solid #ccc; padding: 10px; color: #333; ...
1
vote
2answers
87 views

Any benefits of splitting web project stylesheets?

Regarding the fact that C in CSS stands for Cascade, so generally speaking rules described in one file can modify/subsitute rules in other files, can we claim that all project css files should be ...
3
votes
1answer
149 views

Switching CSS to use asset pipeline in Rails?

I have a lot of legacy CSS files from what was a Rails 2.x app that got upgraded to Rails 3.2.8, and I want to switch over to using the Rails asset pipeline for stylesheets. The issue is, the CSS ...
3
votes
7answers
2k views

HTML 4, XHTML and CSS 2 - How long until these are obsolete? [closed]

I got into the game of programming, exactly a year ago. Now i am posing as an HTML, CSS and Javascript Guru. html5 and css3 are the new things out there but in my opinion they are still experimental, ...
0
votes
1answer
46 views

When to use CSS pseudo-elements? [closed]

::before and ::after are CSS pseudo-elements which allow stylesheet to specify the content. Apart from html usually specifying the content, When do I think of using these pseudo-elements?
0
votes
1answer
73 views

How do browsers do CSS caching and why only .alert or .danger but not .alert.danger? [closed]

I read about BEM & OBCSS here and somewhere the author mentioned this: Decoupling selector will not only increase maintainability and scalability: it will speed up the rendering. Most web ...
5
votes
2answers
94 views

How do web developers deal with editing (pre-processed) vendor prefixed CSS in browser dev tools? [closed]

I have a dillema working with CSS. I use a pre-processor to add all necessary vendor prefixes to CSS when it's served, keeping my source code short and simple. However the issue is, by far the most ...
3
votes
3answers
153 views

Is the `<table>` tag and `display:table` a functional or a layout directive?

Background I've always disliked the idea of using the CSS property of display:table. Using it feels like an ugly hack and I always prefer to use a direct <table> tag instead. Of course, I use ...
1
vote
0answers
40 views

Responsive design - up to a point - and then an alternative layout

I am using AngularJs. I am unsure whether this is a pure CSS question, or needs some JS to handle logic. Let's say that want to display a grid full of numbers - and some sort of histogram or other ...
6
votes
1answer
311 views

“CSS first” vs “HTML first” (Bootstrap, SASS)

Kind of a follow-up to Should I write HTML or CSS first? On a relatively large website, we are considering to use SASS and/or Bootstrap. From previous projects, there seem to be different ways to go ...
0
votes
0answers
486 views

Starting off with Grunt in an eclipse webapp project

I've been developing a webapp for some months now using struts2, jQuery and sitemesh to decorate my pages (JSP's mostly). My dependencies are managed by Maven and I've had a fun time learning as I'm ...
29
votes
3answers
18k views

Are there any advantages of SASS over LESS? [closed]

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 ...
39
votes
6answers
1k views

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

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 ...
0
votes
1answer
36 views

When is background-image not wrapped in: url(); [closed]

In CSS you declare a background-image by wrapping it inside a url('') ... is there an example when you don't need do this and if not why does it even exist? Even when you're using base64 you still ...
0
votes
2answers
169 views

How can I show and hide a single field across my web application through a checked value?

Let's say I have a field called "FooName" and I have "FooName" in several places across my web application (ASP.NET MVC4). I have a check box that allows me to turn "FooName" on and off across the ...
4
votes
0answers
65 views

Conditional CSS based on external modifier class - good practice?

Introduction / background: CSS components For a relatively large website we are working with SASS, and trying to manage CSS in components. The basic idea of components is that a component should look ...
1
vote
1answer
259 views

MVC Widget optimization when accessing CSS and Resources

So we're trying to re-imagine our web solution in an MVC fashion. Going from an old webforms based solution to working with ASP.NET MVC with a bootstrap main menu and adding functionality in the forms ...
10
votes
4answers
4k views

Where to master HTML, CSS and Javascript? [duplicate]

Possible Duplicate: What should a developer know before building a public web site? I gotten interested in web-development lately. I am still a student. I learnt basics of HTML, CSS and ...
17
votes
2answers
12k views

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

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 ...
-3
votes
2answers
210 views

In HTML and CSS what are the standard tab sizes? [closed]

I searched on Google but couldn't find an answer. I'd like to know what are the standard tab sizes for HTML and CSS. Is it 2 or 4?