Team:Kent/CSS

From 2014.igem.org

body { font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif; background-image: url(Wiki-background-kent-uni-2014.jpg); margin: 0; padding: 0; border-top-color: #FFF; border-right-color: #FFF; border-bottom-color: #FFF; border-left-color: #FFF;

}


/* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */

.container {

        width: 100%;

max-width: 1260px;

/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */

min-width: 780px;

/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */

background-color: #FFF;

       margin: 0 auto;

/* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */

text-align: right; }

/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */

.header {

       float:left;

background-color: #6F7D94; position:absolute; width: auto;

       top:0px;

}

/* ~~ These are the columns for the layout. ~~

1) Padding is only placed on the top and/or bottom of the divs. The elements within these divs have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

2) No margin has been given to the columns since they are all floated. If you must add margin, avoid placing it on the side you're floating toward (for example: a right margin on a div set to float right). Many times, padding can be used instead. For divs where this rule must be broken, you should add a "display:inline" declaration to the div's rule to tame a bug where some versions of Internet Explorer double the margin.

3) Since classes can be used multiple times in a document (and an element can also have multiple classes applied), the columns have been assigned class names instead of IDs. For example, two sidebar divs could be stacked if necessary. These can very easily be changed to IDs if that's your preference, as long as you'll only be using them once per document.

4) If you prefer your nav on the right instead of the left, simply float these columns the opposite direction (all right instead of all left) and they'll render in reverse order. There's no need to move the divs around in the HTML source.

  • /

.sidebar1 { float:left; width: auto; background-color: #FFFFFF; padding-bottom: 0px; position:absolute;

       margin-top: -55px;


}

.content { text-align:center; width: 960px; padding-top:0; padding-right: 0; padding-bottom: 0; padding-left: 0; margin-top:160px;

}


/* ~~ The footer ~~ */ .footer { padding: 10px 0; background-color: #FFFFFF; position: relative;/* this gives IE6 hasLayout to properly clear */ clear: both; /* this clear property forces the .container to understand where the columns end and contain them */ }

/* ~~ miscellaneous float/clear classes ~~ */ .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */ float: right; margin-left: 8px; } .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */ float: left; margin-right: 8px; } .clearfloat { /* this class can be placed on a
or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */ clear:both; height:0; font-size: 1px; line-height: 0px; }