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
0answers
16 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
0answers
3 views

Div heights not the same after setting equal heights with javascript [migrated]

I have two divs which I would like to be of equal length. Div1 has text in it which determines its height. Div2 is a scroll box which should have apparent height the same as div1. The following code ...
0
votes
0answers
58 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
33 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 ...
-1
votes
1answer
56 views

Should HTML or CSS files count toward a “lines of code” metric? [closed]

I was asked how many lines of code my web application contains. Is it appropriate to include presentation layer/template files such HTML and CSS files in this count? (Note that I am not able to have ...
1
vote
1answer
28 views

Can't find CSS bug that pushes banner/header - Debugging Advice [closed]

How do I debug a CSS element changing? I've tried using Google Chrome's Inspector, setting breakpoints on JS code that I thought were moving the element and setting DOM Breakpoints but I can't pin ...
0
votes
2answers
101 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
1answer
197 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 ...
2
votes
0answers
25 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
72 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?
1
vote
1answer
178 views

html/css/javascript for game ui's

I've been looking into game ui's recently. My conclusion is that html/css/javascript would be the perfect solution IF it was wrapped up in a nice C++ library that allowed for easy integration into ...
1
vote
1answer
47 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
43 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
226 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
92 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 ...
0
votes
2answers
74 views

Should I keep looking through my git history or stop now for these CSS changes? [closed]

So I made a bunch of changes to a Rails codebase I'm working on over a period of a couple of months. Some of these commits inadvertently seem to have changed the CSS layout. The fixes themselves are ...
1
vote
1answer
244 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
97 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 ...
139
votes
8answers
20k views

Why are people making tables with divs? [duplicate]

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
74 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
67 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 ...
1
vote
6answers
533 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, ...
4
votes
4answers
1k 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
66 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
401 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 ...
0
votes
1answer
82 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 ...
0
votes
1answer
167 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
130 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
270 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
207 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
78 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
473 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
53 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
783 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
274 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
184 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
327 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
366 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
186 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
101 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
1answer
100 views

Is this approach to CSS correct?

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
517 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 ...
0
votes
1answer
206 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 ...
1
vote
0answers
57 views

Handling stylesheet from a real programming language

Lately I've been playing with CSS (and other web technologies). I'm a non-web programmer, and probably this is influencing way too much my approach. I found CSS syntax very limited, thus gave a shot ...
0
votes
1answer
116 views

Should ALL divs float left?

I'm designing within an application that I inherited. I have done a lot of work to "consolidate" the CSS which was extremely overworked through much copying and pasting without a lot of strategy ...
1
vote
1answer
113 views

Best way to let users/visitors alter the website design

What I am trying to do is give the users/visitors the option to alter the whole website based on their taste. So they can move for example the sticky bar from top to bottom, alter background colors, ...
2
votes
2answers
169 views

How to be Agile when new work keeps affecting completed work?

The project I'm working on is to re-skin an existing website. The functionality will stay the same, it's just the styles that are changing. In other words, I'm not modifying the HTML, only the CSS ...
0
votes
1answer
478 views

Website File and Folder Structure

I am having a problem learning how proper website structure should be. And by that I mean how to code the pages and how folder structure should be. Currently I am navigating around my website using ...
3
votes
1answer
434 views

For web apps (vs web pages) why not put scripts and css inline? [duplicate]

I understand that for normal websites you'd want to share scripts and css and therefore liking to them means that each page shares them from the cache. But this question is not about "normal multipage ...
1
vote
2answers
218 views

What license is HTML released under?

All products seem to be released with a license, I'm curious to know how one would go about finding out the license of technologies like HTML, CSS and JavaScript?