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

learn more… | top users | synonyms

4
votes
1answer
31 views

Opinions on my HTML structure

I have spent the last 6 months as I am studying web development in college to build a website template that is responsive and accessible from as many devices and browsers as possible. I would really ...
5
votes
1answer
133 views

Is there a shorter way to write this jQuery code?

I'm using two category filters from this demo. I give the filters two different sets of classes so they won't affect each other. Since I'm very new to jQuery, all I can come up with is repeating the ...
3
votes
1answer
36 views

Inset Text Shadow Review

DEMO: http://jsbin.com/nehut/1/edit?html,css,output HTML <body> <!-- Introduction to the text shadow property --> <div class="container one"> <h1>The Dark ...
6
votes
1answer
51 views

Member list reveals member information on click (#2)

Not a follow-up, but related to Member list reveals member information on click (#1). I now want my CSS reviewed. What I'm doing? The content in a list of members is revealed by jQuery (see review ...
5
votes
2answers
85 views

Injection with Chrome Extension

I am building a Chrome extension that injects a small overlay in to all websites using a content script. At this point all the injected elements do is sit in the bottom left corner. It has two buttons ...
10
votes
3answers
141 views

MS Excel type of grid in jQuery

I have created a MS Excel type of grid in jQuery. I want to learn best practices and I need your comments for more optimized code. Please review the code and offer your suggestions. Demo jQuery: ...
10
votes
3answers
141 views

Ultimate Tic-Tac-Toe Challenge

This is my attempt at the Ultimate Tic-Tac-Toe code challenge. It uses jQuery to build out the game grid and find the states of all the "buttons" (actually <div>s) when calculating whether or ...
8
votes
3answers
162 views

Testimonial section with HTML tags

I created this testimonial on CodePen I am a bit skeptical about a few things in my HTML structure. For example, I typically see testimonials enclosed in <div>s with custom classes. In my ...
21
votes
5answers
1k views

Verifying password strength using JavaScript

I have a function which verifies the Password field and suggests the user to enter a strong password. I also have a label named Password Strength, referring to the strength of a password (very weak, ...
15
votes
3answers
694 views

View for Ultimate Tic-Tac-Toe board

I've put together a board for Ultimate Tic-Tac-Toe (What's that?). This is part of the current code-challenge: Code a Ultimate Tic-Tac-Toe Resources: Live demo of my view – For you to see ...
3
votes
2answers
53 views

How can this <ul> be set up to maximize inheritance if additional classes will be passed in from a JSON file?

Objective Currently I have the flags hardcoded. But want to optimize my code for production. So I am wondering if I have this code done clean enough to leverage CSS inheritance while maintaining ...
5
votes
1answer
121 views

Was this use of <img> tags in this HTML over background images better?

I saw this UI for a mobile app, but I reverse engineered it for the web. This is how it looks in my CodePen This would be either a favorites or featured list locations to travel to. I decided to go ...
3
votes
1answer
55 views

HTML and CSS markup to achieve desired result

I am new to HTML and CSS. I was wondering if anyone could give me some advice on my use of markup and CSS to achieve this result. I am trying to get a fixed full height sidebar with a list with sprite ...
5
votes
2answers
104 views

Monopoly: Board creation

After initially struggling with the board size, I have now decided the dimension. Please review my code. In the code I am generating HTML code using PHP and MySql. I have not added the database, ...
4
votes
1answer
35 views

Is this HTML structure and CSS DRY enough in this country selection menu?

I have built this conceptual design of a localization menu on this CodePen I am wondering if I should have structured my <div>s better or if this should be wrapped in a <ul> instead ...
7
votes
1answer
112 views

Improve mixin that outputs page-specific CSS

As part of this answer, I created a mixin to generate some page-specific CSS for me. I need to style an element based on a class I assign to the html-element. I do this for four different classes on ...
7
votes
2answers
162 views

Is my use of CSS inheritance clean enough for these sprites?

I have a set of links with background images on this CodePen. I am seeking feedback to see if I did this the most optimal way. For example, I made a sprite so that I can just load one image. And I ...
1
vote
1answer
75 views

Monopoly: Creating a monopoly board

I am creating a Monopoly board game using HTML, CSS, PHP, JS and JQuery. I am doing this to develop my web development skills. I have cut the project into sections. So this question will only deal ...
7
votes
6answers
164 views

How would you better organize/code this basic HTML and CSS?

I'm curious to see what any of the more experienced programmers would do instead of methods I took as a learning tool. Any tips/tricks/fixes and reasoning is appreciated!! http://www.jacobweyer.com ...
2
votes
3answers
75 views

Better way to use pseudo elements

Here is a JSFiddle of an accordion menu that i've done. I have used :before to add the icons. My question is, is there a better way to Add different icon to each li item? My code is as follows: ...
0
votes
0answers
10 views

Sass File Formating - what problems might are there with the following rules? [migrated]

For a while now I have been considering the formatting of css files to maximise their usability by other coders and I think that this would be perfect place to get some feedback on the rules I try to ...
4
votes
1answer
128 views

Slide out CSS menu

I've developed a simple CSS transition solution for a slide out menu with a single toggle, and would love some feedback on if anything could be simplified or improved. Markup <!DOCTYPE html> ...
5
votes
1answer
70 views

Resize iframe & textarea in reverse directions

I have a textarea and iframe whose sizes should change dynamically and in reverse directions. I'd like to achive this effect without using a frameset or jQuery plugin. Here's the result of my attempt: ...
3
votes
2answers
62 views

Making CSS rules for links in header more DRY

I want to implement the cleanest amount of CSS through proper use of inheritance. All links need to be a shade of white, so lets say #fff HTML <div class="header"> <div ...
7
votes
1answer
95 views

Improve page-specific CSS for different color schemes

For a website with four pages (blog, portfolio, profil and impressum) I have four different color schemes (for links, headings, code, etc.). This results in bloated CSS which I want to reduce. Here ...
8
votes
2answers
75 views

One page website with JS functionality

I am fairly new to web development, and would like some feedback. It is HTML/CSS, with some JS (button hovers, anchor scrolling and image sliders) from elsewhere. Comments on best practices and any ...
7
votes
3answers
98 views

Removing unnecessary floats, height, widths

I have coded a webpage and it looks exactly how I want, but I think there could be improvements, possible as unnecessary floats, etc... Could anybody please review my CSS code? Its not difficult or ...
5
votes
1answer
69 views

jQuery Fallback Support for the CSS Property “background-attachment: local”

I have made some jQuery Fallback Support for the CSS Property "background-attachment: local" and I am mainly a CSS developer. I do some jQuery, but I thought I would check to see if I am doing this in ...
6
votes
1answer
80 views

Plain CSS buttons in different sizes

Just a plain button, in different sizes. I wanted to achieve exactly the same styling cross browser for both anchors, inputs and buttons. I'm just wondering if this could be improved. Markup ...
2
votes
1answer
43 views

Performance Issue on css and javascript styling

I make some ui custom controls. Typically my controls have themes to them so it can be changed. I dont use css files for each themes. What I do instead is hava a javascript file that contains the ...
4
votes
2answers
51 views

How clean is this mustache template for a listing page?

This was our old site that I am redesigning. Someone else hardcoded with inline CSS and javascript in tables. I wanted to make it dynamic, so I added Mustache and made this template: {{#labs}} ...
4
votes
2answers
33 views

Changing text with a click event: how to restore default state of text in jQuery if/else statement

I have a click event that calls a function which makes some CSS changes (acts on Text in 3 unique text elements). The function (below) works, but is lacking a 'restore default' function (to return ...
6
votes
2answers
66 views

Tabulate text with javascript

Pretty printer in ABAP does not take care of all my aligning need, so I wrote a small js script that tabulates/aligns with a custom string. It contains html, css and script in 1 file because this is a ...
2
votes
2answers
54 views

Rotate image via javascript using CSS

I'm doing a clock in javascript and I am not sure this way is the best way to rotate the pointers. Is this ok, or is there a better way? // browser vendors var browsers = [ 'webkit', ...
-2
votes
1answer
56 views

Using a div only as a spacer [closed]

I implemented a CSS class to add margin bottom. .mb24 { margin-bottom: 24px; } Which I thought I could just add to any div that needed that amount of spacing. But there were some conflicts when ...
0
votes
2answers
66 views

Is this the right way to space four news blocks right from each other?

I am working on a website and I've created four text/image news blocks. I am not sure if it's the right / most efficient way to do this. See my code here at jsfiddle HTML: <div id="wrapper"> ...
4
votes
1answer
61 views

Webpage Template

Introduction I am designing a website as a hobby. As you can probably tell from the code below, I am an absolute beginner. The first thing I'd like to do is to create a nice webpage template that I ...
2
votes
2answers
96 views

Highlight the active link in a navigation menu

I wonder if my script is all right. Please review my code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Menu</title> <style> ul ...
4
votes
1answer
175 views

Handling Hover Events on a Touch Screen

A website I have designed uses a nav menu that shows submenus on :hover. The initial site did not use any responsive design: it targeted only the desktop environment. I am now using responsive-design ...
3
votes
4answers
91 views

Coding upgrade (CSS3 x jQuery) tips

I'm just beginning web design, and I've come up with this code to scroll to a place in the same page. I don't know if this can or should be improved much longer, so I'm asking for any tips that can ...
2
votes
1answer
78 views

How can I optimize my python code to minify JS and CSS on the fly

Below is the python code to compress js and css files. import sys import os import glob import shutil import fnmatch import os.path import re import argparse import time #Store the time the script ...
5
votes
1answer
81 views

How to optimize my CSS/HTML webpage?

I am working on a (HTML/CSS) website to improve my skills but I am not sure if I am doing it the right way, because I have a lot of floats and sizes. I also need help with some CSS things: What I ...
5
votes
2answers
162 views

How can I improve the following code using HTML5 and CSS3?

Using the Flat Web Design Tutorial offered at 1webdesigner I tried converting the resulting PSD file to HTML5 and CSS3. While attempting to use sectioning elements in the markup I quickly found myself ...
-3
votes
1answer
61 views

CSS align header label and span [closed]

I want to create page that will show me server info. I tried as shown bellow to add header then label then span, but when Im trying to align the info every time it's become a mass. HTML CODE <div ...
-5
votes
1answer
144 views

Creating a background using only HTML/CSS [closed]

I have the following form in my jsFiddle. I wonder if this is the best way to achieve this result. Thank you in advance. I am using a lot of divs. Being that it must have width 100% full window. ...
4
votes
2answers
203 views

Responsive HTML5/CSS Code Review

Please review my code based off an responsive Initializr template. It's functional and visually correct, but I know there's better ways to write the code. Let me know if I can layout the HTML5 better ...
3
votes
1answer
66 views

SASS Code Structure / Readability

I'm trying out a new approach to SASS stylesheets, which I'm hoping will make them more organizined, maintainable, and readable. I often feel like there is a thin line between code that is well ...
4
votes
2answers
57 views

Iconography - How would you improve this?

I would like your opinion on the following subject. I have to provide icons in different sizes and states. The sizes will be 16*16, 24*24 and 32*32. The states bright, dark, disabled and link. ...
3
votes
1answer
52 views

Which is the more preferable font size reset?

Up until now, I've been using a 14-pixel reset in my theme's main CSS file, but after looking online, I see that a lot of web developers prefer a 10-pixel reset; Here is what I'm currently using: /* ...
4
votes
2answers
54 views

CSS selector, performance improvement

So, I have this CSS selector: .img + *{ } Which, from my understanding, will make the browser look for all the elements and then select only those which follow an element with the class img. Is ...