Questions tagged [css]

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

CSS, short for Cascading Style Sheets, is a language used to control the presentation of HTML and XHTML documents. Each CSS document is made out of rulesets preceded by a selector - a set of rules for matching HTML and XHTML elements, containing property-value pairs that defines the presentation of the elements matching the selector. CSS is presented as a collection of features (CSS1, CSS2, CSS3).

Useful links

Pure CSS Alternatives (CSS Automation)

Frameworks

704 questions
22
votes
6 answers

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 automatically?
js-coder
  • 491
  • 1
  • 3
  • 10
20
votes
5 answers

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 forever forgetting and Google seems populated with…
Mâtt Frëëman
  • 303
  • 2
  • 6
7
votes
4 answers

Numbered list with subclauses

I'm trying to create a legal document with decimal numbered subclauses, then alpha and roman subsub and subsubsub clauses. (whew!) `1. MAIN HEADING 1.1 This is an example of a sub-clause and you can see that even though the words continue on to the…
Barry Clearwater
  • 71
  • 1
  • 1
  • 2
6
votes
1 answer

Format numbers with css

Is it possible to format numbers using css ? When I have 7000000.00, I would like it displayed as 7 000 000.00 I know I could write a backend (php, perl...) function or a javascript function that could return the formatted number but... The numbers…
Luc M
  • 285
  • 1
  • 4
  • 11
5
votes
4 answers

Why is the outer div border not dependent on the element's rendered content?

I have a problem I can't figure out. When I nest a div inside another div and I want to give the outer div a border, the border doesn't wrap around the rendered content. Even though the content of the inside divs might be several lines high the…
Linda Jensen
  • 53
  • 1
  • 3
4
votes
3 answers

div collapsing over repositioned element

I want a list of rows that have the following look to them: +------------------------#main-----------------------+ | | | | | +------+ Lorem ipsum…
Jeff
  • 143
  • 2
4
votes
1 answer

Making a div wrap around the content

I have a div but it fits to the borders of the container instead of wrapping around the text. I tried float:left but it will push it to the side and there's no way to make it go to the center. Help? Code: div.warning-stripe { padding:2px; …
kettlepot
  • 143
  • 1
  • 1
  • 3
4
votes
2 answers

"Effective width" of a css element could reasonably includes what? width, ?margin?, ?padding?

Eric Meyer just tweeted that he got 100% in this quiz: http://net.tutsplus.com/quizzes/nettuts-quiz-1-beginner-css/ So I took the quiz, and at the end they told me that I got one question wrong: What’s the effective width of the container? …
Kzqai
  • 1,332
  • 2
  • 9
  • 22
4
votes
1 answer

Tailwind CSS text and image on same line?

Using Tailwind CSS

With TailwindCss beforeafter.com

Produces: with the link…
CW Holeman II
  • 155
  • 1
  • 1
  • 7
3
votes
0 answers

Is px a good unit to use in css?

When styling a website we have to deal with screen sizes and we normally size elements using px unit. I use bootstrap and there as well we have media queries to control at what screen size we should display or hide elements. One example is this …
user66633
  • 31
  • 1
3
votes
3 answers

Where can CSS be located if not in a CSS file?

I am attempting to locate some CSS rules but they do not exist in the index.php header tag, nor in the only CSS file which the header references. Where else could they be?
user10560
3
votes
2 answers

Should I change from reset.css to normalize.css

I have been using css reset for quite a while now in different project, and I am quite pleased with it, always get good results. One thing that always bothered me was that I needed to overwrite a lot of elements, for example clearing the margin of…
Saif Bechan
  • 1,590
  • 1
  • 14
  • 24
3
votes
1 answer

Best practice for measurements relative to screen size, on mobile devices?

What unit or approach is best (or at least good!) practice for using measurements relative to screen size? I'm constraining this question to mobile devices, which I suspect may affect the answers. I'd thus wrap the styles inside @media (hover:none),…
tog22
  • 409
  • 5
  • 17
2
votes
1 answer

How is style of tags at math.stackexchange done?

I like the style of tags at math.stackexchange.com. In fact, I'd like to create something similar and I was wondering how are they styled. First of all, I've launched Firebug and was trying to analyze the DOM. Let's see i.e. [graph-theory]…
rafek
  • 121
  • 4
2
votes
1 answer

Is scroll bar included in the browser viewport width?

Wondering for CSS purposes if the scroll bar is included in the viewport width? Specifically I'm thinking about calculating the sizes for img srcset. For example, would I need to account for it by subtracting like this, where the 17px is the scroll…
jetyet47
  • 221
  • 1
  • 2
1
2 3 4