﻿/* BasicLayout.css (c) Petena AB 1993-2010, http://www.petena.se, http://www.praktit.se

  Three-column, float-based layout utilizing negative margins to 
  provide column placement and cross-browser compatibility.

DEVELOPMENT HISTORY: ******************************************************************************
  20071103 PiS -> Start
  20081103 PiS -> visual_consistencies.css included here for simplicity
  20090503 PiS -> Svalovsgk.se anpassning
  20100331 PiS -> Added: #middle-column { overflow: hidden; } to hide if min-max width is used.

BUGS & NOTES: *********** ( !=Warning, +=Additions to be made, -=Comment ) ************************
  - Compiled from SkidooRedux.css : 2007.08.09 : ruthsarian@gmail.com
  ! Override these settings with your stylesheet theme.css
  ! Use stylesheet print.css to override settings when doing printing
  
COMPILER CONDITIONALS  ***************************************************************************/


.clear-columns{
	clear: both;
}
#outer-column-container{
	border-left: solid 200px #fff;	/* left column's width and background color */
	border-right: solid 250px #fff;	/* right column's width and background color */
}
#inner-column-container{
	width: 100%;		/* force this element to take the full width
				   between the left and right columns. this is
				   especially important as children of this
				   element will have width:100%; set, and how
				   that 100% value is interpreted depends on
				   the width of it's parent (this element). */
}
#source-order-container{
	float: left;		/* float left so the right column, which is outside this element, has a place to go. */
	width: 100%;		/* force this to go as wide as possible */
	margin-right: -1px;	/* make room for the right-column's overlap. */
}
#left-column{
	float: left;		/* float left, where it'll live */
	margin-left: -200px;	/* move it further left. the value here should be the same value as the left border width
				   on #outer-column-container, but negative */
	width: 200px;		/* need to set a definite width, should be the same width as the left border width on
				   #outer-column-container */
	margin-right: 1px;	/* overlap the middle column to help with clearing. see general notes above. */
}
#middle-column{
	float: right;		/* middle column goes right of the left column
				   since the two share the same parent element */
	width: 100%;		/* make the middle column as wide as possible
				   for a fluid layout. this is not possible if it's parent element, 
				   #source-order-container, wasn't also at 100% width */
	margin-left: -1px;	/* make room for the left-column's overflap */
	overflow: hidden; /* hides right overflow if widthmin-max is used */
}
#right-column{
	float: right;		/* float on the right side of the layout */
	margin-right: -250px;	/* move it further right. the value here should
				   be the same value as the right border width
				   on #outer-column-container, but negative */
	width: 250px;		/* need to set a definite width, should be the
				   same width as the right border width on #outer-column-container */
	margin-left: 1px;	/* overlap the middle column */
}

/*******************************************************************************
 * BASE THEME
 *
 * Setup basic styling for the layout. This will set gutterspace and generate a
 * basic border structure for the layout. Real layout styling belongs in a 
 * separate "theme" stylesheet; leave this stylesheet untouched.
 */
body{
	background-color: #fff;
	color: #000;
	padding: 0;			/* padding on the body element when javascript min-width is in use will
					   create problems in IE/Win 6. */
	margin: 14px 0;			/* horizontal margins belong on #page-container. vertical margins
					   are not there as well due to small rendering issues in IE/Win 5 when
					   viewport is shorter than webpage */
}
#page-container{
	background-color: #fff;		/* background for the middle column */
	border: solid 1px #7f8485;		/* border around the entire layout */
	min-width: 900px;		/* limit how narrow the layout will shrink before it stops. */
    max-width: 1240px;
	margin: 0 14px;			/* horizontal margins here instead of on 
					   the body because we're setting min-width on this element. if margins set 
					   on body users will see an odd skip in the layout's rendering as it's 
					   resized below min-width. (JS-based min-width only.) */
}
#masthead{
	padding-top: 1px;		/* hack to force teh entire masthead to receive the background color */
	border-bottom: solid 1px #7f8485;	/* three of the four sides of this block
					   will already have borders courtesy of the #page-container element so we 
					   only need to render the bottom. */
}
#inner-column-container{
	border: solid 1px #7f8485;
	border-width: 0 1px;
	margin: 0 -1px;			/* compensate for the borders because of 100% width declaration */
}
#middle-column div.rMenu-center{
	border-bottom: solid 1px #7f8485;	/* border along the bottom of the horizontal menu at the top of
					   the middle column */
}
#footer{
	border-top: solid 1px #7f8485;	/* same situation as the masthead but this time we're rendering the top border. */
	padding-bottom: 1px;		/* hack to force the entire footer to receive the background color */
}
#inside-left-column{ /* margins inside the the left column */
  margin: 4px;
  margin-top: 12px;
}
#inside-middle-column{ /* margins inside the middle column */
  margin: 12px;
  margin-bottom: 4px;
}
#inside-right-column{ /* margins inside the right column */
  margin: 4px;
  margin-top: 12px;
}
.inside{
	margin: 10px;			/* margin, instead of padding, used to induce margin collapse if needed by 
				 	   child elements */
}

/*******************************************************************************
 * HACKS
 *
 * Not all browsers are created equal. Many CSS engines behave differently
 * and can create discrepencies in the rendering of your layout across different
 * browsing platforms. These hacks are aimed to resolve those discrepencies
 * and provide a more consistent look to the layout.
 *
 * CSS hacks work by playing to a bug in the CSS engine or parser for a given 
 * browser. This forces the browser to either apply or ignore a rule that other
 * browsers wouldn't. This lets you apply rules to work around bugs in a specific
 * browser that would otherwise break the layout. 
 *
 * It's important that when you use a CSS hack you do so in a way that is as
 * specific in targeting the problem browser as possible. Some hacks might
 * work for two or three different platforms, but you only need to apply it on
 * one platform. You might find that this hack has no adverse effects on those
 * other two platforms right now, but in a later version the hack might create
 * problems. Save yourself the headache and do as much as you can to narrow
 * the target of a CSS hack as much as possible.
 *
 * COMMON HACKS USED HERE
 *
 * The star-html hack (* html) targets Internet Explorer, both Windows and Mac,
 * for versions 6 and earlier. There is no element higher up in the page
 * than the HTML element. IE seems to think otherwise. Rules applied to any
 * selector that begins with "* html" will be ignored by just about every
 * browser except Internet Explorer. So any selector given below that begins
 * with "* html" is targetted at Internet Explorer.
 *
 * The backslash-star comment hack targets IE/Mac. CSS comments end with an 
 * asterisk and forward slash. Anything after that closing comment mark will
 * be interpreted as as CSS rule. However if you prefix that closing comment
 * mark with a backslash, IE/Mac won't recognize that the comment has been
 * closed, but other browsers will. So any rules that come after the hacked
 * closing comment will be applied by any browser except IE/Mac until a 
 * non-hacked closing comment is found. 
 *
 * With the above two hacks outlined, it's possible to target IE on a specific
 * OS platform. This is important as the CSS and rendering engines for Mac and
 * Windows are completely different and have very different requirements in
 * terms of hacks.
 *
 * You may see other empty comments in wierd places, those are variations on
 * another comment hack to help target specific version of IE/Win (separating
 * IE 5 from IE6 typically). 
 *
 * One other you'll see is a height setting of 0.1%. This is to trigger
 * hasLayout (see reference section below). IE (at least pre-version 7) 
 * will automatically expand a box beyond it's set height if its content
 * is too tall. Setting height to 100% also works, but this can lead to
 * problems where an element that should only be a few pixels tall turns
 * out to be as tall as the rest of the page. By setting it to 0.1% you
 * minimize the chance of elements being set taller than they need to be.
 *
 * WHY USE HACKS?
 *
 * For compatibility sake. Specifics on what each hack does, and why its
 * used, is provided with the rule or ruleset in question. However, the 
 * majority of hacks used have to do with an internal property in IE
 * called hasLayout. The first item in the reference section below has
 * all you could ever want to know, and more, about hasLayout.
 *
 * REFERENCE
 *	http://www.satzansatz.de/cssd/onhavinglayout.html
 *	http://www.communis.co.uk/dithered/css_filters/css_only/index.html
 */
.clear-columns
{
	/* hide from IE/Mac \*/
	padding-bottom: 1px;
	margin-bottom: -1px;		/* this padding/margin hack is here for
					   older Mozilla engines (Netscape 7, 6,
					   FireFox pre 2.0) which will not allow 
					   an element to clear unless it has some 
					   effect on how the rest of the layout 
					   renders (ie, it takes up space). 
					   Hidden from IE/Mac as it triggers a 
					   horizontal scrollbar. */
}
* html #page-container
{
	/* \*/ height: 0.1%;	/* IE/Win 5 needs this to prevent rendering
				   issues if a minimum width is applied to
				   this element and the viewport is sized
				   narrower than it's minimum width. however
				   this breaks IE/Mac so a comment hack is
				   used to hide it. */
	position: relative;	/* IE/Mac 5.0 seems to need this. without it
				   any child element with position: relative
				   isn't rendered. */
}
* html #middle-column, * html #left-column, * html #right-column,
* html #source-order-container
{
	/* hide from IE/Mac \*/
	overflow: visible;	/* a bug through IE/Win 6 causes the widths of
				   text boxes to be calculated narrower than
				   they render, causing overflow of their parent
				   elements. we need to explicitly handle this
				   overflow. IE/Win 5.0 does not handle visible
				   overflow correctly and so on some layouts,
				   at some viewport widths you'll get a 
				   horizontal scroll bar. */
	/* hide from IE/Mac \*/
	position: relative;	/* this resolves rendering bugs in IE/Win.
				   without this the columns don't render on
				   screen or text jog. */
}
* html #middle-column
{
	margin-right: -4px;	/* fix 3-pixel text jog in IE/Win 5.0.
				   -4px because we also have to
				   compensate for the overlaps from
				   the left and right columns */
	margin-right/* */: 0;	/* reset value on 5.5 and later using
				   comment hack to hide this rule from 5.0 */
}
* html #middle-column .inside
{
	margin-right: 14px;		/* compensate for negative margin in
					   previous rule */
	margin-right/* */: 10px;	/* reset margins for 5.5 and later */
}
* html #masthead, * html #footer
{
	/* hide from IE/Mac \*/
	height: 0.1%;		/* this is to fix an IE 5.0 bug. setting this
				   value forces these elements to contain their
				   child elements, meaning margins will no
				   longer collapse. */
	height/**/: auto;	/* reset for IE/Win 5.5 and later by hiding
				   this rule from 5.0 with the empty comment
				   hack. also hidden from IE/Mac for the same
				   reason. */
}
* html #masthead .inside, * html #footer .inside
{
	margin-top: 0;
	margin-bottom: 0;	/* since margins no longer collapse due to 
				   previous rules we remove vertical margins
				   from the .inside class */
	margin/* */: 10px;	/* reset for IE 5.5 and later */
}
* html .inside
{
	margin: 10px 0.75em;	/* i don't yet understand this bug in IE 5.0
				   which forces the right column down if the
				   side margins are at a very specific value.
				   if your side column widths are set in EMs,
				   0.75em seems to work fine. */
	margin/* */: 10px;	/* reset for IE 5.5 and later */
}
* html #inner-column-container 
{
	display: block;
}
* html #source-order-container
{
	margin-right: -100%;	/* IE/Mac will force #source-order-container
				   to the width of #left-column, even though
				   that element is no longer inside it. this
				   negative margin will help IE/Mac keep the
				   three columns together under narrower 
				   viewports than normal.
	/* \*/ margin-right: -1px; /* reset the above hack for IE/Win */
}
#left-column, #right-column
{
	position: relative;	/* resolve issues with links in left and right
				   columns not being clickable in Safari */
}

/******************************************************************************/
/*******************************************************************************
*  visual_consistencies.css : 2005.09.07 : Ruthsarian Layouts
* -----------------------------------------------------------------------------
*  Edited for size
*******************************************************************************/

ul, ol, dl, p, h1, h2, h3, h4, h5, h6 {
	margin-top: 10px;
	margin-bottom: 10px;
	padding-top: 0;
	padding-bottom: 0;
}
ul ul, ul ol, ol ul, ol ol {
	/* kill margins on sub-lists */
	margin-top: 0;
	margin-bottom: 0;
}
h1
{
	font-size: 240%;
}
h2
{
	font-size: 180%;
}
h3
{
	font-size: 140%;
}
h4
{
	font-size: 100%;
}
h5
{
	font-size: 70%;
}
h6
{
	font-size: 50%;
}
a, a:link, a:visited, a:active
{
	color: #304e8d;
	text-decoration: none;
}

a:hover
{
	/* because I like the visual feedback a user gets when they
	 * mouse over a link and see the underline of the link
	 * disappear.
	 */
	text-decoration: underline;
}
code, pre
{
	/* Make sure we're all using the same monospaced font for CODE
	 * and PRE elements
	 */
	font-family: "Courier New", Courier, monospace;
}
label
{
	/* It's all about the visual feedback. In this case, label 
	 * elements are usually clickable which then set focus on
	 * their target. I want to show that to the user in a manner
	 * they are used to and understand.
	 */
	cursor: pointer;
}
table
{
	/* Some browsers won't carry the font size down into the 
	 * browser like they're suppose to.
	 */
	font-size: 100%;
}
td, th
{
	/* I never like or use the default vertical centering "feature"
	 * provided by tables. 
	 */
	vertical-align: top;
}
body
{
	/* I've seen several comments that setting the base font size to 100.1%
	 * fixes some browser bugs. Which bugs? I don't know. I believe it's
	 * to fix some rounding-error bugs that some browsers (Mozilla) are
	 * prone to. It doesn't hurt anything, so I keep it here.
	 */
	font-size: 100.1%;
}

/******************************************************************************/
