I'm building a site that will have a header that is 960px wide and 186px tall/high. I have a logo that sits to the left side of this which takes up 443px of the width, leaving 517px to its right of blank space that currently only has a background color.
I'd like to use the remaining header to its right - the 517 x 186 area for buttons to navigate around the site, with buttons split in two rows - meaning either 3-4 buttons across the top 517 x 93 px portion of this, and another 3 or 4 buttons across the bottom 517 x 93 in this part of the header
I'm not sure how to go about arranging the placement for these. I tried a search, but may not be using the correct terms as I really didn't find what I am looking for, or I couldn't quite absorb the results.
This is the first site I've ever created, and I'm doing it for a business that I'm launching. Someone else was already helpful with the first question I've had. Hopefully this and any others I may have won't be seen as a nuisance. I'm putting it together in a trial of Dreamweaver.
See the code below for what I have currently. Some content specific to the business has been replaced with generic terms.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background-color: #C9D6A0;
margin: 0;
padding: 0;
color: #000;
font-family: "Century Gothic";
}
/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 15px;
padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
text-shadow: #A2C8CA 0 0 1px;
-webkit-text-stroke: 0.65px
-webkit-font-smoothing: antialiased;
color: #AED6D9;
font-weight: 525;
font-size: 11pt;
line-height: 150%;
}
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
}
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #42413C;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}
a:visited {
color: #6E6C64;
text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
}
/* ~~ this fixed width container surrounds the other divs ~~ */
.container {
width: 960px;
overflow: auto;
background-color: #603B3D;
margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
}
/* ~~ 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 {
height: 186px;
width: 960px;
background-color: #603B3D;
text-align: left;
font-size: 0pt;
position: fixed;
}
/* ~~ This is the layout information. ~~
1) Padding is only placed on the top and/or bottom of the div. The elements within this div 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.
*/
.content {
margin: 186px 0 0;
padding: 10px 0;
font-family: "Century Gothic";
font-size: 12pt;
}
/* ~~ The footer ~~ */
.footer {
padding: 10px 0;
background-color: #CCC49F;
}
/* ~~ 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 <br /> 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;
}
body,td,th {
color: #AED6D9;
}
-->
</style><script type="text/javascript">
<!--//--><![CDATA[//><!--
//
// CSS Photo Shuffler v1.0 by
// Carl Camera
// http://iamacamera.org
//
// SetOpacity Function and inpiration from Photo Fade by
// Richard Rutter
// http://clagnut.com
//
// License: Creative Commons Attribution 2.5 License
// http://creativecommons.org/licenses/by/2.5/
//
// Customize your photo shuffle settings
//
// * Surround the target < img /> with a < div >. specify id= in both
// * The first and final photo displayed is in the html <img> tag
// * The array contains paths to photos you want in the rotation.
// If you want the first photo in the rotation, then it's best to
// put it as the final array image. All photos must be same dimension
// * The rotations variable specifies how many times to repeat array.
// images. zero is a valid rotation value.
var gblPhotoShufflerDivId = "photodiv";
var gblPhotoShufflerImgId = "photoimg";
var gblImg = new Array(
"scene 97 WM.jpg",
"scene 98 WM.jpg",
"scene 20 WM.jpg",
"scene 43 WM.jpg",
"scene 39 WM.jpg",
"scene 60 WM.jpg",
"scene 79 WM.jpg",
"scene 96 WM.jpg"
);
var gblPauseSeconds = 7.25;
var gblFadeSeconds = .85;
var gblRotations = 100;
// End Customization section
var gblDeckSize = gblImg.length;
var gblOpacity = 100;
var gblOnDeck = 0;
var gblStartImg;
var gblImageRotations = gblDeckSize * (gblRotations+1);
window.onload = photoShufflerLaunch;
function photoShufflerLaunch()
{
var theimg = document.getElementById(gblPhotoShufflerImgId);
gblStartImg = theimg.src; // save away to show as final image
document.getElementById(gblPhotoShufflerDivId).style.backgroundImage='url(' + gblImg[gblOnDeck] + ')';
setTimeout("photoShufflerFade()",gblPauseSeconds*1000);
}
function photoShufflerFade()
{
var theimg = document.getElementById(gblPhotoShufflerImgId);
// determine delta based on number of fade seconds
// the slower the fade the more increments needed
var fadeDelta = 100 / (30 * gblFadeSeconds);
// fade top out to reveal bottom image
if (gblOpacity < 2*fadeDelta )
{
gblOpacity = 100;
// stop the rotation if we're done
if (gblImageRotations < 1) return;
photoShufflerShuffle();
// pause before next fade
setTimeout("photoShufflerFade()",gblPauseSeconds*1000);
}
else
{
gblOpacity -= fadeDelta;
setOpacity(theimg,gblOpacity);
setTimeout("photoShufflerFade()",30); // 1/30th of a second
}
}
function photoShufflerShuffle()
{
var thediv = document.getElementById(gblPhotoShufflerDivId);
var theimg = document.getElementById(gblPhotoShufflerImgId);
// copy div background-image to img.src
theimg.src = gblImg[gblOnDeck];
// set img opacity to 100
setOpacity(theimg,100);
// shuffle the deck
gblOnDeck = ++gblOnDeck % gblDeckSize;
// decrement rotation counter
if (--gblImageRotations < 1)
{
// insert start/final image if we're done
gblImg[gblOnDeck] = gblStartImg;
}
// slide next image underneath
thediv.style.backgroundImage='url(' + gblImg[gblOnDeck] + ')';
}
function setOpacity(obj, opacity) {
opacity = (opacity == 100)?99.999:opacity;
// IE/Win
obj.style.filter = "alpha(opacity:"+opacity+")";
// Safari<1.2, Konqueror
obj.style.KHTMLOpacity = opacity/100;
// Older Mozilla and Firefox
obj.style.MozOpacity = opacity/100;
// Safari 1.2, newer Firefox and Mozilla, CSS3
obj.style.opacity = opacity/100;
}
//--><!]]>
</script>
<!--------------------------------------------------------------------------------
<!--
var gblPhotoShufflerDivId = "photodiv";
var gblPhotoShufflerImgId = "photoimg";
var gblImg = new Array--></head>
<body>
<div class="container">
<div class="header"><img src="Logo.jpg" width="443" height="186" alt="Logo 443"></div>
<div class="content">
<p> </p>
<div id="photodiv"><center>
<img id="photoimg" src="scene 96 WM.jpg" /></center>
</div>
<p> </p>
<p>MY FIRST PARAGRAPH OF TEXT. MY FIRST PARAGRAPH OF TEXT. MY FIRST PARAGRAPH OF
TEXT. MY FIRST PARAGRAPH OF TEXT. MY FIRST PARAGRAPH OF TEXT. MY FIRST PARAGRAPH OF
TEXT. MY FIRST PARAGRAPH OF TEXT. MY FIRST PARAGRAPH OF TEXT. MY FIRST PARAGRAPH OF
TEXT. MY FIRST PARAGRAPH OF TEXT.</p>
<p> </p>
<p>MY SECOND PARAGRAPH OF TEXT. MY SECOND PARAGRAPH OF TEXT. MY SECOND
PARAGRAPH OF TEXT. MY SECOND PARAGRAPH OF TEXT. MY SECOND PARAGRAPH OF TEXT. MY
SECOND PARAGRAPH OF TEXT. MY SECOND PARAGRAPH OF TEXT. MY SECOND PARAGRAPH OF
TEXT. MY SECOND PARAGRAPH OF TEXT. MY SECOND PARAGRAPH OF TEXT.</p>
<p> </p>
<p>MY LAST PARAGRAPH OF TEXT. MY LAST PARAGRAPH OF TEXT. MY LAST PARAGRAPH OF
TEXT. MY LAST PARAGRAPH OF TEXT. MY LAST PARAGRAPH OF TEXT. MY LAST PARAGRAPH OF
TEXT. MY LAST PARAGRAPH OF TEXT. MY LAST PARAGRAPH OF TEXT. MY LAST PARAGRAPH OF
TEXT. MY LAST PARAGRAPH OF TEXT.<br>
</p>
<p> </p>
<p></p>
<h1> </h1>
<strong>
<!-- end .content -->
</strong></div>
<div class="footer">
<p>Footer</p>
<!-- end .footer --></div>
<!-- end .container --></div>
</body>
</html>
I'm also having a problem with the automatic photo album (I found the shuffler online - it's not my creation:
http://iamacamera.org/sandbox/photoshuffler/). Except for the initial picture in the div (which hides under the header correctly), once you scroll up a bit, the pictures end up overlapping the fixed/locked header, instead of hiding behind it (like the text), but I may need to start another thread for this issue...