background preloader

CSS Design

Facebook Twitter

Js. A gridster configuration object. Define which elements are the widgets. Can be a CSS Selector string or a jQuery collection of HTMLElements. Horizontal and vertical margins respectively for widgets. Base widget dimensions in pixels. The first index is the width, the second is the height. extra_rows: 0 Add more rows to the grid in addition to those that have been calculated. extra_cols: 0 max_cols: null The maximum number of columns to create. Min_cols: 1 The minimum number of columns to create. min_rows: 15 The minimum number of rows to create. max_size_x: false The maximum number of columns that a widget can span. autogenerate_stylesheet: true Don't allow widgets loaded from the DOM to overlap.

A function to return serialized data for each each widget, used when calling the serialize method. Draggable.start: function(event, ui){} A callback for when dragging starts. draggable.drag: function(event, ui){} A callback for when the mouse is moved during the dragging. draggable.stop: function(event, ui){} 960 Grid System. Create a new fiddle - JSFiddle. HTML Forms: From Basics to Style: Layouts. Now that we have discussed the different elements of a form, it's time to look into putting it all together. The layout of a form is crucial--a bad layout will cause confusion, make the form difficult to use, and drive away your traffic.

In this article, I will discuss different table layouts and how to achieve the same results using pure CSS. There are several ways to design a form. A common way "in the old days" was to use tables. Since the introduction of Cascading Style Sheets (CSS), we have a much better way to layout tables. You are free to use whatever method you want to layout your form, but this is the method I have found that works the best. After creating hundreds of forms, this method has served me well. Our First Form The form we will start off with will be a shipping address form. Figure 1 A Little Better The first problem is that there is nothing to indicate what these fields are for. Figure 2 This is better, but the form fields do not line up very well--time to add some CSS. Learn CSS Positioning in Ten Steps: position static relative absolute float. 1. position:static The default positioning for all elements is position:static, which means the element is not positioned and occurs where it normally would in the document.

Normally you wouldn't specify this unless you needed to override a positioning that had been previously set. 2. position:relative If you specify position:relative, then you can use top or bottom, and left or right to move the element relative to where it would normally occur in the document. Let's move div-1 down 20 pixels, and to the left 40 pixels: Notice the space where div-1 normally would have been if we had not moved it: now it is an empty space. It appears that position:relative is not very useful, but it will perform an important task later in this tutorial. 3. position:absolute When you specify position:absolute, the element is removed from the document and placed exactly where you tell it to go. Let's move div-1a to the top right of the page: What I really want is to position div-1a relative to div-1. Footnotes 10.