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

2
votes
0answers
38 views

jQuery Plugin for Dynamically Sticky Headers and Footers

I am creating a jQuery plugin to be used to stick the headers and footers of tables (or other list data) to the top and bottom of the viewport while scrolling. (i.e. scrolling down the page, the ...
-4
votes
0answers
42 views

How can I better my code? [closed]

Please note that I am not looking for answers, rather I am looking for advice. I am a novice and I am learning off treehouse videos and I really want to understand this. Please dont downvote me and if ...
-5
votes
1answer
49 views

How do I write the following JQuery functions in plain JavaScript? [closed]

Im trying to build a configurator with transparent images. Right now the image configurator works over a simple JQuery function: I have given each input element a data attribute which I have called ...
3
votes
1answer
36 views

Simple HTML and CSS website

I'm making a really simple html website with CSS and I was hoping on some feedback. A few notes: There will be more content under this, but I want the starting screen to take up the full page and ...
-2
votes
2answers
62 views

Fasten single line of code for div resize [on hold]

I have this one single line of code I wanted to improve. My main concern is the execution and rendering speed of it. Even though I am happy with its speed, could it be improved? ...
1
vote
3answers
51 views

Hovering over multiple images to show another image while also fading in and out in jQuery

I'm trying to figure out how to correctly hover over an image to fade in another image and when you move your mouse out, it would go fade back to the normal image. ...
12
votes
2answers
174 views

JavaScript dropdown menu

In the past when I needed something like a dropdown menu, it was really easy to toggle the appropriate CSS classes with jQuery. Here is my first attempt to do the same thing without any dependencies: ...
15
votes
6answers
1k views

To-do list in jQuery

I'm making a simple to-do list with jQuery. This is my first step in JavaScript and jQuery. How can I improve my code? User enter tasks in input field, submit by pressing 'Enter'. On double-click, he ...
3
votes
1answer
37 views

Algorithm for subdividing html-elements

I am trying to write a module that automatically subdivides div-elements, given some initial parameters. I've prepared the following jsfiddle. What I am doing at the moment is: Setting the width ...
1
vote
1answer
44 views

Close modal and open new modal

I am trying to create a script that shows my login modal on page load. I have a button that opens the register modal and closes the login modal if clicked. Here is the script I am using: ...
2
votes
2answers
77 views

A chessboard model in JavaScript

I've created a chessboard model in JavaScript that will eventually iterate through some moves of a championship game. I've created a board object and a piece constructor. I've also created all the ...
3
votes
1answer
58 views

HTML/CSS MS Word style navigation ribbon

I made a MS Word style ribbon header, but it all seems very hacky, and I'm not really sure how to simplify it to something more reasonable. Rolling over one of the navigation icons changes the related ...
5
votes
2answers
235 views

Handling multiple click events of sliding divs

You are first confronted by three links. Each link triggers divs to slide out. The divs slide out and up to appear as if unfolding. The slide back in reverse when any other link on the page is ...
2
votes
2answers
40 views

Maintainable way to concatenate strings in JS and vendor prefixes

I am writing a jQuery plugin which, among other things, inserts a stylesheet in the head. Additionally, I also require vendor prefixes. A lot of values are derived from variables in the script, and ...
2
votes
1answer
52 views

Setting header color on scroll for each post

On this site this site, I have some code which you can see below which figures out the offset for each post from the top of the document and assigns a colour from each post to the header when it ...
1
vote
1answer
48 views

Image slider demo

Since I'm new to web development, I've decided to create this carousel, to practice a bit of JavaScript, more specifically jQuery. I'm really happy with the result, but I'm sure that to an expert my ...
7
votes
3answers
106 views

On hover, hide text and display options

Recently I learned HTML+CSS and a bit of jQuery and am building various web-things to stretch my skills and learn more about how to do things the right way. I was a bit surprised at just how many ...
1
vote
1answer
53 views

Element selectors for a RepeatButtonView

I have a large application with a wide-reaching amount of views and sub-views. I have a need to decorate DOM elements with identifiers so that my framework of choice can bind views to the DOM ...
2
votes
1answer
55 views

JavaScript dropdown component

How can I improve this component with using event delegation rather than doing a lookup using parentNode so that I can change the markup around without having to ...
8
votes
2answers
290 views

Simple syntax highlighter

I've made a simple in-browser syntax highlighter using JQuery. It's pretty simple, it just wraps keywords, integers, and such in <span> elements with color ...
4
votes
2answers
57 views

Dynamically Generating a Map Webpage for MMO

This question is related to my previous question about an MMO Server. Here, what I am doing with this program is connecting to another Java server program that resides on the same server as the MMO ...
13
votes
3answers
303 views

Quick CSS style generator

One day, I was thinking: Wouldn't it be nice to set a class and have all the styles defined? And that is exactly what I did: a PHP file that generates CSS with pre-defined styles. So, for fun, I ...
3
votes
0answers
74 views

Personal Website

I have written the following code for my personal website, in Jade and Stylus. Can anyone review this code? Are there any tips that you can give me on how to make it better? Here is the main-page.jade ...
1
vote
1answer
80 views

Udacity Intro to HTML and CSS layout sample

I'm going through the Udacity Intro to HTML and CSS course at the moment, and one of the exercises is to convert this mockup to HTML and CSS. I did the following, and it looks ok-ish: HTML: ...
3
votes
2answers
78 views

CSS Coding Style - Floating and text alignment

I'm not sure what is the best way to handle css when I have two uses of a class where the difference is one floats left and the other right. An example: ...
0
votes
1answer
29 views

Are heavy selectors in CSS readable?

Take the below code that I recently wrote: .navbar-inverse .emphasis-text, .navbar-inverse:hover .emphasis-text, .emphasis-text { color: #1caa98; /* Teal */ } ...
1
vote
0answers
40 views

Setting fixed height panes based on window's width

I have a webapp that follows responsive design and has following layout structure. The left layout appears when the window's width > 768px and right layout shows ...
3
votes
3answers
82 views

Switch questions using JavaScript and CSS

I am writing a Q&A wap page and want to switch questions in one page. This is my first time to write JS and CSS code, so I think there must be some improvement. ...
-3
votes
1answer
55 views

Simplify LESS :hover and :focus

I have the following snippet of LESS code to generate CSS. I have some different classes which I apply to different elements, and on hover or focus they should change color. ...
3
votes
1answer
63 views

JavaScript Dropdown Selector

I am just getting into front-end web development and to practice, I made a dropdown selector that allows for more styling than the regular <select> element. ...
3
votes
2answers
86 views

Sliding effect with bounce

I have used animate.css and jQuery as external libs. Is there a better way of doing what I have done with jQuery? DEMO ...
1
vote
2answers
79 views

jQuery pullout functions

I am using a simple page with 2 pullout functions, one on the left and one on the right side. I would like to simplify or combine the two functions into one and make one pullout close, when I click on ...
3
votes
1answer
122 views

Bootstrap 3 custom header

I need a second set of eyes to look at my twitter bootstrap 3 header. I would welcome some insight on the code structure and methodology as it relates to bootstrap best practices and efficiency. ...
15
votes
2answers
263 views

Calculator Snippet CC

The April 2015 Community Challenge requires building a calculator. Implement a simple calculator Where the definition of "simple" is whatever you make it - only supports basic arithmetic ...
6
votes
2answers
45 views

Scaling the last column in a table (with input) to match the container

I recently ran in to a problem with the presentation of data related to a graph. Each series of data has values that define the 'curve'. There can be a lot of these values, and I decided that there ...
1
vote
2answers
65 views

Consolidating my HTML, CSS and JS code in order to adhere to best practices

As I'm getting to grips with front end development I'm looking to consolidate/improve my below HTML, CSS and JS code in terms of adhering to best practices so any advice is appreciated. Quick ...
4
votes
2answers
52 views

Nav slider needs to be smoothed out

I created this responsive jQuery navigation which will re-size when the pixels get < 500 px and display the mobile navigation, although when the browser re-sizes > 500px it runs the widthCheck() ...
-1
votes
1answer
23 views

What is the recommended way of structuring CSS? [closed]

I have the following CSS: .class { margin: 1%; margin-left: 0; } I wonder whether another way would be better? Option a) ...
1
vote
3answers
67 views

Formatting in webpage quiz

Particularly on the CSS page, in the #question_list id, you'll see I've put a transparent border. This is obviously pointless, but without that border, my footer ...
11
votes
7answers
452 views

Music Theory Website

I was just curious to know what you think about this website I'm designing. I would just like any constructive feedback that you might have. http://jackatron.web44.net/music/ ...
2
votes
1answer
50 views

Getting CSS files based on production or development

I have the below script which returns CSS files based on production or development environment. The development section is fine; but for production I have to do 2 loops to get the files. Is there a ...
3
votes
1answer
45 views

HTML & CSS accordion

I'm looking for suggestions to improve my accordion code. Someone could also use it as a starter for their code. Here's the demo. ...
3
votes
0answers
67 views

Responsive bullets with horizontal and vertical centered HTML content

In my current project I develop a responsive site which has only on desktop a fixed width. Otherwise it's fluid. My client or rather my art director ;) want's fluid bullets with horizontal and ...
4
votes
1answer
47 views

Custom tooltip containing a list

I'm looking to improve my code as seen in the demo link below. The code displays a list in a tooltip. The tooltip is accessed by hovering over the last element of the main list. Here's the demo. The ...
5
votes
2answers
470 views

Calendar in HTML + CSS + JS - Improvement suggestions

As I'm new to HTML + CSS + JS I've been building a calendar (which I think anyone can use as a basis) but would like to get your suggestions on how I could improve my code specifically from the ...
0
votes
1answer
28 views

Random fadeIn has unwanted pauses [closed]

I have a title with each character and word split into a <span>, using lettering.js. I am relatively new to jQuery and ...
2
votes
2answers
41 views

Identifying clicked elements

I'm relatively new to web development. I started learning JavaScript a few months ago and it's going well. I made this code for someone on fiverr, and it got the job done, but I know there's a more ...
3
votes
2answers
256 views

Responsive web design using HTML5/PHP/Bootstrap3.3.4

I am trying to understand the basics of responsive web design using bootstrap. So, is this a good way of structuring the layout of a responsive web page or are there any other/better alternatives? ...
4
votes
1answer
79 views

Simple morphing button concept

I have been making a jQuery morphing button type thing. jsFiddle ...
2
votes
2answers
85 views

Simple mobile-first/responsive Grid System (w/ IE8 Support)

I now use a grid system similar to that of the one created by André Luís located here: http://andr3.net/blog/post/142 and evolved by Lea Verou located here: ...