38 users online (2 members and 36 guests)  


Page 2 of 2 First 1 2
  Results 16 to 17 of 17

Related

  1. CSS Layers and Scrolling    Forum: CSS Forum
    Replies: 3
  2. Relative Positioning    Forum: CSS Forum
    Replies: 1
  3. relative positioning, i think    Forum: CSS Forum
    Replies: 1
  4. columns associated with layers    Forum: CSS Forum
    Replies: 1
  1. #16
    dlongnecker's Avatar
    Tired Student...(Z_z)

    Status
    Offline
    Join Date
    Aug 2004
    Location
    Wichita, KS
    Posts
    86

    Talking HUZZAH part deux!

    Alrighty--a fresh start this week does wonders for the mind.

    The "working" CSS is:

    Code:
    body {
    	color:#333;
    	background-color:#6699CC;
    	margin:20px;
    	padding:0px;
    	font:11px verdana, arial, helvetica, sans-serif;
    	}
    h1 {
    	margin:0px 0px 15px 0px;
    	padding:0px;
    	font-size: 1.5em;
    	font-weight:900;
    	color:#999;
    	}
    h2 {
    	font:bold verdana, arial, helvetica, sans-serif;
    	font-size: 1.25em;
    	margin:0px 0px 5px 0px;
    	padding:0px;
    	}
    p {
    	font:100% verdana, arial, helvetica, sans-serif;
    	margin:0px 0px 16px 0px;
    	padding:0px;
    	}
    .Content>p {margin:0px;}
    .Content>p+p {text-indent:30px;}
    
    a {
    	color:#09c;
    	font-size:100%;
    	font-family:verdana, arial, helvetica, sans-serif;
    	font-weight:600;
    	text-decoration:none;
    	}
    a:link {color:#09c;}
    a:visited {color:#07a;}
    a:hover {background-color:#eee;}
      
    
    /* All the content boxes belong to the content class. */
    .content {
    	position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
    	width:auto;
    	min-width:120px;
    	margin: -10px 190px 20px 190px;
    	/* Because I can never remember: margin top, right, bottom left */
    	border:1px solid black;
    	background-color:white;
    	padding:10px;
    	z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
    	}
    
    #navBoxLeft {
    	position: relative;
    	width: 190px;
    	margin-bottom: 10px;
    	border: 1px dashed #000000;
    	background-color:#eee;
    	padding: 10px;
    	z-index:2;
    
    /* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity. 
    Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it. 
    IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style 
    declaration. The incorrect IE5/Win value is above, while the correct value is 
    below. See http://glish.com/css/hacks.asp for details. */
    	voice-family: "\"}\"";
    	voice-family:inherit;
    /* width 150 - padding left (10) - padding right (10) - border left (1) 
    	- border right (1) = 128px width */
    	width:168px;
    	}
    /* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct 
    length values to user agents that exhibit the parsing error exploited above yet get 
    the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
    a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
    body>#navBoxLeft {width:168px;}
    		
    #navBoxRight {
    	position: relative;
    	width: 190px;
    	border: 1px dashed #000000;
    	background-color:#eee;
    	padding: 10px;
    	margin-bottom: 10px;
    	z-index: 1;
    /* Again, the ugly brilliant hack. */
    	voice-family: "\"}\"";
    	voice-family:inherit;
    /* width 190 - padding left (10) - padding right (10) - border left (1)
    	- border right (1) = 168px width */
    	width:168px;
    	}
    /* Again, "be nice to Opera 5". */
    body>#navBoxRight {width:168px;}
    
    /* Build left-hand container layer */
    #ParentLeft {
    	position: absolute;
    	top: 10px;
    	left: 10px;
    }
    /* Build right-hand container layer */
    #ParentRight {
    	position: absolute;
    	top: 10px;
    	right: 10px;
    	float: right;
    }
    While not a huge issue, on small resolutions (800x600), having large pictures in the center content DIV just doesn't make it happy. Something to realize and accept--and to make thumbnails at smaller resolutions. I did tweak it and remove the 20px paddings and put 10px... screens are small enough... 40px for both paddings was killing me.

    The biggest joy out of this is that it looks beautiful in Netscape 7.2, Opera 5, Firefox, IE, and even Lynx. Huzzah!

    As I said, original code belongs to BlueRobot's CSS Layout Repository, mods here are available to all--go, seek, and improve! This whole thing has been a frustrating, but fun.

    I've also attached a screenshot of what it looks like in IE and Firefox tiled next to one another... just FYI.

    Good luck and thanks to everyone who helped!

    -David
    Attached Images Attached Images

  2. #17
    supertek's Avatar
    please contact admin

    Status
    Offline
    Join Date
    Aug 2004
    Location
    Wichita, KS
    Posts
    19
    Sweet. Glad that went together the way it should



Page 2 of 2 First 1 2

Tags for this Thread