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
2answers
30 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 ...
-4
votes
0answers
17 views

Adjacent sibling selector not working [on hold]

I want to make a sidebar that slides down on label click without using javascript but I'm having trouble with the adjacent sibling selector. This is html: <div class="pageWrap"> <input ...
0
votes
3answers
44 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 ...
3
votes
3answers
153 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
0answers
46 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
61 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
108 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
1answer
44 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
71 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
84 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
136 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
38 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 ...
1
vote
2answers
83 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 ...
0
votes
0answers
301 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 ...
0
votes
2answers
492 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 ...
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
143 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 ...
6
votes
1answer
287 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 ...
4
votes
0answers
47 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 ...
-3
votes
2answers
166 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?
2
votes
1answer
64 views

Bundling and minifying options for MVC2

I've just been handed an MVC2 application and noticed that there is no bundling or minifying of the JavaScript or Stylesheets. I've used the built in bundling and minifying logic that comes out the ...
0
votes
1answer
63 views

Sense user-agent to determine HTML - Keep HTML and Logic separate?

I am of-the-understanding that you should try to keep HTML out of your logic, and keep logic out of your HTML. E.G.: You don't write HTML in (C# strings or Javascript Services) and pass them into the ...
2
votes
2answers
302 views

Pre-Processors vs Pure Web [closed]

It seems like within the last few years or so HTML/CSS/JavaScript Preprocessors have exploded in quantity and general use. They're still not as common as pure HTML, CSS, and JS/jQuery, but their ...
-1
votes
1answer
126 views

How do I customize Bootstrap? [closed]

I am a desktop programmer but currently I am trying to develop a website. I know HTML, CSS, Javascript and PHP but writing the complete code from scratch isn't encouraged and well, I end up with weird ...
3
votes
1answer
699 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 ...
1
vote
1answer
102 views

Multiple CS Sheets or Javascript

I have a homepage with a navigationBar on top of the Viewport contains two buttons. One is the default selected home button which calls/displays home.html. The other for example is Ubuntu which calls ...
161
votes
8answers
46k 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> ...
1
vote
1answer
81 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?
1
vote
1answer
70 views

Is it OK to replace html on resize?

I was asked to take over a web project. It is supposed to be a responsive website, but the former programmer didn't write the HTML/CSS with responsivity in mind and adding code to make it responsive ...
2
votes
6answers
1k 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, ...
7
votes
4answers
3k 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
1answer
90 views

SASS placeholders to avoid repeated rules in CSS output

I've got a question for all the frontend guys here. First of all, this is not about placeholders vs mixins as I've already have an idea about, whether to use one or another. So the question is - do ...
1
vote
3answers
662 views

Conceptually, is the single page web app more efficient than the web app that loads pieces of the page for every page? [closed]

I searched a lot, but nobody seems to have explained this nor given a proper example. I have a page like this: My team says they want to design the code such that the Title section, Menu ...
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
271 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. ...
2
votes
1answer
132 views

Sacrificing readability for shorter compiled code

I'm currently revisiting some code I wrote in sass when I was learning it and I came upon a particular issue. I was able to write the code in 2 ways, with the first being the more readable code and ...
1
vote
1answer
455 views

Is it okay to use CSS3 with HTML4?

Is it alright to use CSS3 with HTML4. It seems like CSS3 would be a HTML5 complaint deal. But I'm not sure if that's the case. If it's not okay, what are the downfalls to using CSS3 with HTML4, ...
11
votes
0answers
219 views

Math model for a webpage layout? [closed]

While web-programmers surely know CSS/HTML rules by heart, and web-browsers have algorithms to render web-pages, what interests me whether there are any mathematical/theoretical models or at least ...
0
votes
3answers
96 views

CSS: When to use which selector

I've been learning HTML5/CSS3 for a month now, and I've built my first demo website. At first I was using a lot of the element selectors like: >, ,, + in combination with the type names for ...
0
votes
2answers
701 views

How to best do cross-browser cross-platform visual CSS regression testing? [closed]

Background: Visual CSS regression testing is where you screenshot (part of) one version of a webpage in a browser and compare it against a screenshot of the previous version of the same webpage in the ...
1
vote
0answers
59 views

Rationale behind CSS height with percentage value

I've been using CSS for a few years, but there are some "quirks" that I cannot quite fathom. One of them is the height property when specified with a percentage. To quote the CSS 2.1 Specification ...
1
vote
2answers
1k views

CSS Preprocessing (SASS or LESS) vs CSS Postprocessing

So I stumbled across some frameworks for doing CSS post processing such as pleeease.io and I was wondering what are some main benefits or use cases for using CSS post processing? I feel you can ...
1
vote
1answer
462 views

For HTML report generation, should CSS be put into stylesheet or written into the html file?

I'm writing a report generator for an automation tool. Right now I have a report template html file which is read by the generator and the results are filled in by the tool to be written to another ...
-1
votes
1answer
244 views

HTML and CSS required for .NET Development [closed]

On a job application, part of the job description is "...needs to know HTML and CSS as some .NET is required...". What does this mean? I thought HTML is a programming language, CSS is a way to ...
0
votes
2answers
420 views

What are the tecnhical reasons for email HTML, CSS, Javascript limitations and their persistance [closed]

If you've ever made a custom email you'll know that there are significant limitations in you need to be aware of. The most obvious limitations being: No support for Javascript in emails No support ...
0
votes
2answers
459 views

Changing CSS classes when different strings are displayed in a text element with jQuery [closed]

I'm just wondering if this method would be possible using jQuery HTML and PHP. Basically I have a filtering system were products are listed, some have different attribute values such as Hatchback for ...
2
votes
1answer
199 views

Uniform identifier/class naming across HTML, CSS and JS

How does one ensure that HTML, CSS and JS have uniform identifiers. For example, one such set of identifiers could be class names. e.g.: CSS: .user-profile{ ... } JS: ...
0
votes
1answer
118 views

With a highly bespoke responsive website, will it be most effecient to customise bootstrap / use something else (pure-io?) / roll my own rules [closed]

I've got a few non trivial responsive website builds coming up. They are not platforms or apps, but large marketing / brochure websites where eye for detail is important. I've used bootstrap ...
2
votes
2answers
130 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; ...
3
votes
1answer
554 views

Why are there so many CSS properties which are essentially the same?

This answer really made me wonder. I've written CSS before and (usually) I don't really bother to support browsers other than recent firefox and chrome, but in researching I've noticed that, for the ...