Side shadow on floating page

Hi, I would like my site to have a centered page with a slight drop shadow on each side. The margins would be flexible but the centered content (960px) would be static.

This is what I would like on the sides (left side showing):

This is what I have now (left side showing):

I’m thinking I need to do something with a .png file like the one below:

What CSS code would I need to do this? And, how would I make the centered page’s background go all the way to the bottom of the page if I don’t have a lot of content on that page?

I am new at this and putting the site together with Dreamweaver… that’s how I did the navigation. Using “Build Your Own Site The Right Way, Using HTML & CSS” has helped me to understand what’s going on - great book!

Here is relevant code I have so far for my CSS style sheet:

@charset "UTF-8";
/* CSS for site. */

body,td,th {
	font-family: Verdana, Geneva, sans-serif;
	color: #404040;
	font-size: 13px;
}
body {
	background-color: #E5E5E5;
	margin-top: 0px;
	text-align: center;   /* Allows the content to be center with the div#theContainer */
}

div#theContainer   /* Allows the content to be center */
{
	width: 960px;
	margin-left: auto;
	margin-right: auto;
	background-color: #F8F8F8;
	text-align:left
	
}

#padder 	/* Puts a margin around the centered content on pages.  */
{ 
	padding-left: 30px;
	padding-right: 30px;
	border-left-style: solid;
	border-right-style: solid;
	border-width: 1px;
	border-color: #B0B0B0 ;
}



p.mNone {   /* Gets rid of the space between the top image and navigation bar. */
  margin: 0;
padding-top: 0em;
padding-bottom: 0em;
}

Here is HTML from a Template page:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Template</title>
<link href="style2.css" rel="stylesheet" type="text/css"/>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div id="theContainer">
<div id="borderContent"> 


<p class="mNone" align="left"><img src="images/masthead_imag.jpg" width="960" height="164" /></p>


<ul id="mainNav" class="MenuBarHorizontal">
  <li><a href="index.html">Home</a>  </li>
  <li><a href="free-trial.html" title="Try AlbumsInDesign">Free Trial</a></li>
  <li><a href="products.html" title="AlbumsInDesign Products" class="MenuBarItemSubmenu">Products</a>
    <ul>
      <li><a href="products/script-set.html" title="Script Set">Script Set</a></li>
      <li><a href="products/indesign-album-tutorials.html" title="Tutorials">Tutorials</a></li>
</ul>
  </li>
  <li><a href="indesign-vs-photoshop.html">Why InDesign</a></li>
  <li><a href="#">Faqs</a></li>
</ul>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("mainNav", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>


<div id="padder">


<p>&nbsp;</p>
<h1>Learning Web Design!</h1>
<p>&nbsp;</p>
</div>
</div>
</div>
</body>
</html>

Thank you so much for taking a look at this and any advice you may have.

Since the shadow is on both sides, you would make a single png (or whatever) that’s got both shadows on the edges, with 960px of transparent (or white if IE6 is supported) in the middle.

The one you’re centering, #theContainer, is the one who will hold that background image. However because the image is wider than the 960px, you’ll add sidepadding to #theContainer equal to whatever width you have of the shadows themselves (so if one shadow is 20px wide, then you’ll add 20px of padding to both sides of #theContainer).

This means #theContainer will be wider than 960px! But it will still be centered and because inside padding was used, the content inside won’t be able to be wider than 960 (so you are keeping your content-width at 960px).

To get it to go down to the bottom all the time, though, is a problem. You will need to use the 100% height method, OR see if you can use a whole other technique: setting that image on the body or html elements and centering it:

body {
background: #e5e5e5 url(images/theshadow.png) center top repeat-y;
}

So long as the body is as tall as the user’s screen, the image will repeat. Sometimes the body stops at the content though, in which case you could either move the image to the html element (who is always filling the viewport) OR do a
html, body {
height: 100%;
}

If you want to know the 100% height trick, search for Paul O’B’s posts on it. You want his version, the original, not the ones with retarded markup like <div id=“push”></div> cause you don’t need extra markup for this.

A note:


body {
	background-color: #E5E5E5;
	margin-top: 0px;
	[b]text-align: center;   /* Allows the content to be center with the div#theContainer */[/b]
}

No, because you’re just setting them all back to left with


div#theContainer   /* Allows the content to be center */
{
	width: 960px;
	margin-left: auto;
	margin-right: auto;
	background-color: #F8F8F8;
	[b]text-align:left[/b]
	
}

What the text-align: center does is cater to IE5 and below. It works also on IE6 and 7, but they don’t need it if you have a complete doctype. Without a complete doctype they’ll go into Quirks mode and act like IE5.5 and need text-align to center blocks (incorrectly), but with the doctype the automargining works like in other browsers.

Unless you’re actually checking your pages in IE5 or catering to those users, it’s code that just takes up bytes. it doesn’t hurt though.

Also, I haven’t seen a Spry menu work correctly in IE ever. The last one I saw I rewrote into a Sons of Suckerfish dropdown with added CSS keyboarding support and then [url=http://blakehaswell.com/lab/dropdown/deux/]Blake Haswell’s enhancing Javascript with a fix added to that for Gecko and IE6. Just sayin’.

Any reason why p.mNone has align = left? Since everything in #theContainer is already aligned left, you can’t make that p any lefter. And, it’s markup being used for presentation.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

Two notes:
DreamBeaver starts folks on the evil foot (that would be the left, or sinister foot btw). Unless you are planning on using align=left, center tags, font tags, or the target attribute, use Strict. Let the validator really tell you every little thing you do wrong. Transitional just shuts it up and you never learn the difference.

Second, add a language attribute in the html tag. Since you’re using XHTML, it’s used like this:
<html xmlns=“http://www.w3.org/1999/xhtmllang=“en” xml:lang=“en”>
So, both lang (for html) and xml:lang (for xml even though your XHTML isn’t really XHTML). This tells bots and accessibility software what language the document is written in. It can tell a screen reader how it should pronounce the words it finds on the screen.

Let us know if the shadow image thing doesn’t work out.

Thanks Stomme! Instructions for the graphic and code worked like a charm. The image is filling the screen even when content isn’t.

Still wrapping my brain around the 100% thing. I’m looking over Paul O’B’s homepage now. He has a lot of info there.

Thanks for commenting on my Spry menu. I’ll check out your links and look into doing it another way.

The “p.mNone has align = left” was probably just an oversight. I was testing a lot of stuff and probably missed that. Looking over the book again I realize I just need a <div> to make the menu flush with the top graphic. So, the p.mNone is not even necessary anymore.

Ok, so it’s advisable to switch the DOCTYPE info to:

[INDENT]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” lang=“en” xml:lang=“en”>
<head>[/INDENT]

as long as I am not using align=left, center tags, font tags, or the target attribute. I should use CSS to align left, center, and name fonts. Is that correct?

Interesting that I put my preferences in DreamBeaver :slight_smile: for Strict but am still getting the transitional verbage. That preference must be for its own evaluation. I looked around and found the link to get a good evaluation: http://validator.w3.org/

Thanks again.

as long as I am not using align=left, center tags, font tags, or the target attribute. I should use CSS to align left, center, and name fonts. Is that correct?

The idea, which I think Ian’s book puts forth pretty well, is that you start with your content (text and maybe images) and mark it up. Say what it is.

Then use CSS to turn it from an ugly college paper to however you want it to look.

This is called “separation of concerns”, where content is dealt with by the HTML and presentation by CSS (and behaviour by Javascript).

Over time you get a better feel of what are appropriate HTML elements and what aren’t.

I wanted to post a link to the 100% height demo that’s most current but Sitepoint’s search is just sitting there giving me no results as usual. Paul has linked to it numerous times but you can’t reach it from his homepage via a link.
http://www.pmob.co.uk/temp/sticky-footer-ie8new.htm this link is for a “sticky footer” which is a technique that requires a 100% high page. Your page is less complicated. The thing to remember about 100% height (besides the fact that normally you can’t set a % height on an element unless his parent has an explicit (non%, non-auto) height) is that you can’t have more than 100%. So once something is set to 100%, you can’t then go add top-bottom padding or margins or borders.

Also, height is a limiting dimension. For your main content block, you’ll see everyone sets a min-height instead (and then height: 100% for IE6 who doesn’t know what min-height means and treats height like min-height anyway…) which is safer… content can grow longer (and create a scrollbar) if necessary.

Still wrapping my brain around the 100% thing

There is a useful thread in the CSS faq at the top of the forum about 100% height that you may find useful:) (The link to the FAQ is also in my sig.)

Thanks Paul and Stomme. I came across Ray’s page and modified the Min Height 100% with Fixed Footer. It looks nice. Here it is: [URL=“http://www.cadillacmargarita.com”]CadillacMargarita.com This is just my testing server. Any ideas on how to get the menu flush with the graphic above?

I can see doing this programming is a real art.

Thanks again.

Yes Rays layouts are always solid and build on the concepts that we advocate in the forums. Howver you have misunderstood the use of the conditional comments and they cannot go in the stylesheet and are in fact corrupting your layout. If the page scrolls with content then the footer scrolls away.

Conditional comments are html and must go in the head of the document and then from inside the conditional comments you can link to a stylesheet with rules just for IE or just have the rules nested inside in a style element.


<!--[if IE 6]>
<style type="text/css">
html {background:#555 url(foo) fixed;}/*fix jitters when using expression (no need for a fake image http request)*/
#wrapper{height:100%;}/*min-height for IE6*/
#footer{/*fixed footer for IE6 using expression*/
    position:absolute;
    top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop +(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));
}
</style>
<![endif]-->


Or replace with a link to another stylesheet.

e.g.


<link href="[main.css](http://www.sitepoint.com/forums/view-source:http://www.pmob.co.uk/pob/main.css)" rel="stylesheet" type="text/css" />

<!--[if lte IE 6]>
<link href="iecss.css" rel="stylesheet" type="text/css" />
<![endif]-->

</head>

Any ideas on how to get the menu flush with the graphic above?

The gap is caused by the image which is placed on the baseline like text and room underneath is left for descenders so set the image to display:block and the gap will disappear.


#header img{display:block}

Ahhh… I see. So, I took the style info relevent to IE 6 and placed it in its own css file. Incidentally the menu system has special css instructions for IE 6 as well. I was directing IE 6 to different css files. So, I combined the files into one and am directing IE 6 to one file now.

Directing IE 6 by:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Albums In Design</title>
<link href="css/style1.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="js/dropdown.js"></script>
		<!--[if IE 6]><link rel="stylesheet" type="text/css" href="css/ie6.css" /><![endif]-->
</head>

Meged the CSS pages:

/* Navigation directed from html page.  */

#nav li.hover ul ul,
#nav li.hover li.hover ul ul,
#nav li.hover li.hover li.hover ul ul,
#nav li.hover li.hover li.hover li.hover ul ul	{ margin-left: -9999px; }

#nav li.hover ul,
#nav li.hover li.hover ul,
#nav li.hover li.hover li.hover ul,
#nav li.hover li.hover li.hover li.hover ul	{ margin-left: 0; }

/* End navigation  */

/* Start Ray's template info directed from html page.  */

html {background:#555 url(foo) fixed;}/*fix jitters when using expression (no need for a fake image http request)*/
#wrapper{height:100%;}/*min-height for IE6*/
#footer{/*fixed footer for IE6 using expression*/
    position:absolute;
    top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop +(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));
}
/* End Ray's template.  */

Still can’t get that image to go flush with the menu. It looks flush in the Dreamweaver design window.

I have tried:


#header {
	
     height:192px; /*120px total with padding*/
   padding:0px 0;/*uncollapse child margins with vertical padding*/
    display:block
}

in my CSS stylesheet and used the html:

<body>
<div id="wrapper">
    <div id="header">
    <img src="images/masthead_imag.jpg" width="960" height="164" alt="AlbumsInDesign Header" />
    <ul id="nav">
			<li>
				<a href="index.html">Home</a>
			</li>
			<li>
				<a href="products.html">All Products</a>
				<ul>
					<li>
						<a href="products/indesign-album-actions-scripts.html">Scripts</a>
					</li>
					<li>
						<a href="products/tutorials.html">Tutorials</a>
					</li>
					<li>
						<a href="products/templates.html">Templates</a>
					</li>
				</ul>
			</li>
			<li>
				<a href="indesign-vs-photoshop.html">Why InDesign</a>
			</li>
			<li>
				<a href="free-indesign-album-tutorials.html">Resources</a>
				<ul>
					<li>
						<a href="free-indesign-album-tutorials/album-setup.html">Album Setup</a>
					</li>
					<li>
						<a href="free-indesign-album-tutorials/resize-parent-books.html">Album Resizing</a>
					</li>
				</ul>
			</li>
			<li>
				<a href="faqs.html">Faqs</a>
			</li>
			<li>
				<a href="about.html">About</a>
			</li>
			<li>
				<a href="links.html">Friends</a>
			</li>
			<li>
				<a href="contact.html">Contact</a>
			</li>
			<li>
				<a href="buy.html">Buy</a>
			</li>
		</ul>
		<script type="text/javascript">dropdown('nav', 'hover', 250);</script>
    </div>
    <div id="content">
        
        <h1>The Ultimate in Album Design Software!</h1>
        <p>The albums indesign script set was created by a photographer for photographers. It speeds up your workflow in design conception, design creation, and template storage. One of its greatest benefits is that it allows you to make changes in your albums more easily than ever before. Many photographers have commented they &quot;just can't live without it!&quot;. Enjoy the introductory video below. It demonstrates all the features of the script package. You can get more details on the products page.</p>
      <p>&nbsp;</p>
      <div align="center"></div>
    </div>
</div><!-- end wrapper -->
    <div id="footer">
        <div class="innerfoot">
            <p>&copy; 2010 AlbumsInDesign.com for InDesign Templates, Actions, Scripts, and Tutorials</p>
        </div>
    </div>
</body>

Any ideas? Thank you so much.

Ok…this is interesting…

Changing the DOCTYPE info from:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

to:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

makes the image go flush with the margin even without the “display:block” in the

#header {
	
    height:192px; /*120px total with padding*/
/*display:block*/
    padding:0px 0;/*uncollapse child margins with vertical padding*/
	
}

I’m still going to use the display:block though.

What does this mean? Can strict be too strict or get buggy in a way?

Here it is loaded up: http://www.cadillacmargarita.com/

Am I ok to use this as my template to make more pages? Did I fix the menus right?

It looks flush in the Dreamweaver design window.

The best thing you will ever do in your web design career is you will ignore any Design view given to you by anything that is NOT a browser. Even if it is based on a browser. Nobody surfs the web with InDesign or Dreamweaver. You will have all your testing browsers open, make a change in your code, then f5 f5 f5 f5 all of them.

I have tried:


#header {
	
     height:192px; /*120px total with padding*/
   padding:0px 0;/*uncollapse child margins with vertical padding*/
    display:block
}

The #header was already a block. It’s a div.

The IMAGE needs to be block (or change vertical-align but you are using it like a block here anyway).

#header img {
target the image itself, it’s inline!;
}

As a note:
padding:0px 0;/uncollapse child margins with vertical padding/

So far as I know, there does have to be at least 1px of actual padding to combat margin collapse… but you don’t have that issue anyways here… no margins on children.

Ok…this is interesting…

Changing the DOCTYPE info from:
(strict) to: (transitional)
makes the image go flush with the margin even without the “display:block” in the #header

Firstly, without display: block nothing changes, because you were calling a block (#header div) display: block.

You can keep Strict if you actually target the image itself as above.

Transitional can change some ways browsers render things though usually the biggest differences are between Complete Doctype and Quirks Mode. But, tranny doctypes also let in the garbage.

The only time I’ve used Tranny on a production page was when I was still using target=“_blank” to prevent loss of form information (before we had session IDs), because it was more honest than a Strict doctype and target. : )

What does this mean? Can strict be too strict or get buggy in a way?

I’d say no. Not with HTML.

Ok…I wasn’t doing that correctly at first. I am targeting it inline and using strict AND IT’S WORKING! Cool!! Thank you guys so much for your time, patience, and detailed help. I really appreciate it.

Yes as Stomme said you misread my original reply and missed the vital ingredient :slight_smile:

Using a transitional doctype changes the way the page is rendered as it tries to preserve legacy behaviour. Some people say that a transitional doctype is akin to saying to the browser " if I make mistakes then try to second guess what they should be". The result is that the browser tries to guess what you meant when it encounters errors.

e.g. If you said height:20 instead of height:20px you may find that some browsers would guess that you meant pixels and apply the measurement as pixels. The fact that you may have meant ems just makes matters worse. Instead of ignoring the rule you get a half right version instead.

Therefore developers prefer to work with browsers that do what they are told and if you tell them nonsense they just ignore it and you have to give them the correct code instead. That’s why you should always use a strict doctype these days and use valid code and then you can reliably project the outcome.

You can read more about doctypes rendering modes here.

http://www.ericmeyeroncss.com/bonus/render-mode.html

I also didn’t realize what I wanted. I had used the fixed border because I thought it was a sticky border. Paul, your template 1 column centered was exactly what I was looking to do. I couldn’t get anything rolling from the faq article on 100% height. I could have been sleepy. I am really grateful you had the 1 column template posted. It looks really straight forward and was easy to adjust. You only have one little “hack” in there. Is it pretty compatible with IE? It’s working great with Mac FireFox, Safari, and Opera.

I had a friend check it on what she thought was an old version of IE and it worked great. The only issue was with my menu. Where Resources has a drop down that did not show. But, that is ok as “Resources” did and that can take them to the children.

I also checked the Spry menu with her IE. Text of the menu disappeared on mouse over. I’m glad Stomme showed me Blake Haswell’s menu. That’s the one I’m using now.

http://www.cadillacmargarita.com

Hi,

That example of mine was a little dated and there is a newer version so i’ve updated the sticky footer code in your layout to the newer version which works in opera and everywhere else. I’ve also removed some of the breaks and empty elements you had in place as they are never needed. Just use margins on existing elements to make the space you need.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Albums In Design</title>
<link href="css/style_site.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
@charset "UTF-8";
/* CSS Document */

/*  Navigation  */
/*  Remove the last underscore on the menu_images_ folder to activate graphics background  */

#nav, #nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#nav {
    background: #5876E6 url(http://www.cadillacmargarita.com/menu_images/nav.png) 0 0 repeat-x;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1em; /* 14px / 16px */
    font-weight: bold;
    height: 2.286em; /* 32px / 14px */
    line-height: 1.5em; /* 21px / 14px */
    width: 960px;
}
#nav li {
    background: #5876E6 url(http://www.cadillacmargarita.com/menu_images/li.png) right top no-repeat;
    float: left;
    height: 2.286em; /* 32px / 14px */
    margin: 0;
    padding: 0;
    position: relative;
}
#nav a {
    background: url(http://www.cadillacmargarita.com/menu_images/a.gif) left top no-repeat;
    color: #F8F8F8;
    display: block;
    padding: 0.286em 20px 0.5em; /* 4px 30px 7px */
    text-decoration: none;
}
#nav a:hover, #nav a:focus {
    color: #FFCC00
}
#nav ul {
    background: #5876E6;
    left: 0;
    font-size: 0.857em; /* 12px / 14px */
    line-height: 1.5em; /* 18px / 12px */
    position: absolute;
    top: 2.667em; /* 32px / 12px */
    width: 180px;
}
#nav ul li {
    background: none;
    float: none;
    height: auto;
    width: 180px;
}
#nav ul a {
    background: none;
    padding: 0.083em 30px 0.25em; /* 1px 30px 3px */
    width: 120px;
}
#nav ul ul {
    font-size: 1em;
}
#nav ul a:hover, #nav ul a:focus {
    background: #5876E6;
}
#nav ul .hover>a {
    background: #5876E6;
}
#nav ul ul {
    left: 180px;
    top: 0.5em; /* 6px / 12px */
}
#nav ul, #nav :hover ul ul, #nav .hover ul ul {
    margin-left: -9999px;
}
#nav li:hover>ul, #nav li.hover>ul, #nav a:focus+ul, #nav ul ul, #nav .hover a:focus {
    margin-left: 0;
}
#nav ul a:focus {
    margin-left: 9999px;
}
/*  END    Navigation   */

/*Opera Fix for sticky footer*/
body:before {
    content:"";
    height:100%;
    float:left;
    width:0;
    margin-top:-32767px;
}
/*IE* Fix for sticky footer*/
#outer:after {
    clear:both;
    display:block;
    height:1%;
    content:" ";
}
/* commented backslash hack v2 \\*/ 
html, body {
    height:100%;
    margin:0;
    padding:0;
}
/* end hack */ 

body {
    background:#e5e5e5 url(http://www.cadillacmargarita.com/images/theshadow.png) center top repeat-y;
    color: #000000;
    text-align:center;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 13px;
}
#outer {
    min-height:100%;
    width:960px;
    background:#FFFFFF;
    color: #464646;
    margin:0 auto -40px;/* make room for sticky footer */
    text-align:left;
    position:relative;
}
#outer p {
    padding:0 28px;
    margin:0 0 1em;
}  /*  Margin on center page where text is located.  */
* html #outer {
    height:100%
}
#header img {  /* Makes the image up top flush with menu.  */
    display: block
}
#header {
    background:#f8f8f8;
    height:192px;
}
#footer {
    text-align:center;
    /*background:f8f8f8;*/
    height:40px;
    width:960px;
    margin:auto;
    font-size: 85%;
    font-style: italic;
    color: #5876E6;
    position:relative;
}
.video {
    width:900px;
    margin:1em auto;
}
.clearfooter{
    clear:both;
    width:100%;
    height:40px;
}
/*  Headers  */


h1 {
    font-size: 130%;
    font-weight: bold;
    color: #FF9900;
    margin:1em 29px;
}
.h1_sub {
    color: #FF9900;
    font-size: 110%;
    font-weight: bold;
}
h2 {
    font-size: 110%;
    font-weight: bold;
    color: #5876E6;
    margin-bottom:0;
    display: inline;
    margin-left: 29px;
    margin-right: 29px;
}
#div1 h2 {
    margin-bottom:0;
}
#div1 p {
    margin-top:0;
}
h3 {
    font-size: 100%;
    font-weight: bold;
    color: #67AC4A;
    margin-left: 29px;
    margin-right: 29px;
}
/* Adding space in text to even out form entry apertures. */
.ws {
    white-space: pre;
}
/*  Sets spacing between lines of photo links.  Note:  I could probably combine this with the one below*/

p.mh {
    margin: 0;
    padding-top: .2em;
    padding-bottom: .2em;
}
/*  Sets font style and puts pointer over photo links.   */
#textPhotoLinks {
    color: #FF9966;
    font-weight: bold;
    cursor: pointer;
}
/*  Sets font style for comments under photos.  But, not really using this anymore.  Going to use what's below..   */
#textPhotoComments {
    color: #FF9966;
    font-weight: bold;
    cursor: pointer;
}
/*  PHOTO COMMENT:  The following is to place small text under an image as a note.
    Here is some sample code:
    
    <br />
    <div class="outer">
        <div class="image"><img src="http://www.cadillacmargarita.com/images/doc_ex.jpg" alt="InDesign album setup" width="900" height="410" /></div>
        <div class="left-foot"><span> &nbsp; &nbsp; ( Elements of the spread above are enlarged for ease of readability and understanding.)</span></div>
    </div>
    <br /> */

.image {
    clear:both;
    margin-bottom: 2px;
}
.left-foot span, .left-head span {
    font-size: 80%;
    font-style: italic;
    float:left;
    text-align:left;
    margin-top: 1px;
}
/*  END  PHOTO COMMENT  */
    
/*  BACKGROUNDS FOR DATA ENTRY FORMS  */

/*  fb = form background.  Sets background for data entry.  */
    #fb1 {
    width: 325px;
    padding: 2px;
    background-color: #E8E8E8;
    -moz-border-radius: 10px;
    border-radius: 10px;
    border: 1px solid #silver;
    padding: 10px;
}
/*  fb = form background.  Sets background for results of data entry forms.  */
#fb1_r {
    width: 325px;
    padding: 2px;
    background-color: #DFFFDF;
    -moz-border-radius: 10px;
    border-radius: 10px;
    border: 1px solid #silver;
    padding: 10px;
}
/*  Sets background full page for results  */
#full_fb1_r {
    padding: 2px;
    background-color: #DFFFDF;
    -moz-border-radius: 10px;
    border-radius: 10px;
    border: 1px solid #silver;
    padding: 10px;
}
/*  END:  BACKGROUNDS FOR DATA ENTRY FORMS  */


 /*  Blue line  */
hr {
    color: #5577E5;
    background-color: #5577E5;
    height: 5px;
    margin-top: 0px;
    margin-bottom: 0px;
}
</style>
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="css/ie6.css" />
<![endif]-->
<script type="text/javascript" src="http://www.cadillacmargarita.com/menu_js/dropdown.js"></script>
</head>
<body>
<div id="outer">
    <div id="header">
        <div id="header img"><img src="http://www.cadillacmargarita.com/images/masthead_imag.jpg" width="960" height="164" alt="Albums In Design logo" /></div>
        <ul id="nav">
            <li> <a href="index.html">Home</a> </li>
            <li> <a href="products-indesign-actions-scripts.html">Products</a> </li>
            <li> <a href="why-indesign-vs-photoshop.html">Why InDesign</a> </li>
            <li> <a href="free-resources-indesign-album-tutorials.html">Free Resources</a>
                <ul>
                    <li> <a href="album-setup-indesign-wedding.html">Album Setup</a> </li>
                    <li> <a href="album-resize-indesign-album-books.html">Album Resizing</a> </li>
                </ul>
            </li>
            <li> <a href="faqs-about-albums-in-design.html">Faqs</a> </li>
            <li> <a href="friends-albums-in-design.html">Friends</a> </li>
            <li> <a href="contact-albumsindesign.html">Contact</a> </li>
            <li> <a href="free-trial-coupon-code-albumsindesign.html">Free Trial</a> </li>
            <li> <a href="buy-wedding-album-indesign-products.html">Buy</a> </li>
        </ul>
        <script type="text/javascript">dropdown('nav', 'hover', 250);</script>
    </div>
    <h1> The Ultimate in Album Design Software</h1>
    <p>The albums indesign script set was created by a photographer for photographers. It speeds up your workflow in design conception, design creation, and template storage. One of its greatest benefits is that it allows you to make changes in your albums more easily than ever before. Many photographers have commented they "just can't live without it!". Enjoy the introductory video below. It demonstrates all the features of the script package. You can get more details on the products page.</p>
    <div class="video">
    <object width="900" height="524">
            <param name="movie" value="http://www.youtube.com/v/4TogDlL_LyY?fs=1&amp;hl=en_US&amp;rel=0">
            </param>
            <param name="allowFullScreen" value="true">
            </param>
            <param name="allowscriptaccess" value="always">
            </param>
            <embed src="http://www.youtube.com/v/4TogDlL_LyY?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="900" height="524"></embed>
        </object>
    </div>
    <div class="clearfooter"><!-- you could use padding bottom on the element above if you don't want this extra div--></div>
</div>
<div id="footer">AlbumsInDesign for InDesign Templates, Scripts, and Tutorials</div>
</body>
</html>


The css is in the head so just put it back where it was . (Note that the urls are absolute for testing as the page can just be copied as is and run in your browser to see what it looks like as long as you are online. You should just do a search and replace and set them back to relative as before.)

I left the clearfooter element in place because you didn’t include the white background in the shadow image and that would have resulted in a 1px jog if I used my other method of soaking up the space (see sticky footer thread in the CSS faq for more info).

Thank you so much Paul! You cleaning up the code makes it so much easier to read and understand. The menu system and its CSS is really so much clearer. I thought my eyes were going to burn up trying to keep track of all those <li>s.

Side note: I noticed that I can make a global change to the menu just by doing a site wide Find and Replace. So, I am not concerned with doing a PHP link to the menu. This is just fine.

What I did was just copy my original index.html and style_site.css pages and put them to the sides. I then loaded up your work.

There is a shift down from the top. I believe it is do to the 40px in the code below:

#header {
    border-top:40px solid #e5e5e5;/* sticky footer soak up */
    background:#f8f8f8;
    height:192px;
}

Before I had:

#header {
	border-top:0px solid #000;
	border-bottom:0px solid #000;
	background:#f8f8f8;
	height:192px;
	margin-left:0px;
	margin-right:0px;
}

Check out the site now: http://cadillacmargarita.com

I notice a shift on the Home page and Why InDesign. What could that be from?

I can change that shadow image no problem. I can’t remember if it was using yours or Ray’s template that I noticed on pixel over on the right side of the page. I trimmed the middle by one pixel and all was good.

Are you advising that I fill the middle length (960px) with a white fill? Then can I leave the sides transparent still? If it would be better to fill it to I can. Then just change the image for a new background if I wanted to do that.

Thanks so much again!

Edit: Changed the 40px in the #header to 0px. It is flush at the top. I hope that didn’t effect something else. Now, only the Why InDesign page is shifting. I’ll look at the code to see what I might have done.

Sorry, I removed that line as soon as I had posted but you must have been too quick for me:)

You can just remove it as I was testing out my preferred sticky footer soak up method but it didn’t work well in your layout because the 1px background jog became evident on the footer as I mentioned above.

What happens when you use the body as a background for the shadow is that the body rounds at different pixels to the centred page due to their different sizes. It only occurs on odd window pixel sizes sizes where the browser has to round. This very very old demo explains why that is.

If you added the white background between the shadow then the jog would be less noticeable where the page is supposed to be white but would still be evident where there are full width coloured sections.

It’s a minor issue in your page so I wouldn’t bother changing it now and the only foolproof method is to apply the image to #outer instead but then you have to make it wider etc.

Now, only the Why InDesign page is shifting. I’ll look at the code to see what I might have done.

What shift are you seeing? It looks ok to me.

Thanks.

The page, “Why InDesign” is shifting a handful of pixels to the left. I took all the html out of it and it is not shifting. So, I’ll some of this back in a little at a time to find the culprit:

<p><span class="h1_sub">Adobe<sub>®</sub> InDesign<sub>®</sub> is a layout program and is the industry standard.  When it comes to creating beautiful albums with speed and precision, InDesign is the right tool for the job.</span>

<p><a href="http://www.adobe.com/products/indesign/" target="_blank"><img class="alignleft" title="Try Adobe InDesign" src="http://www.albumsindesign.com/_folder/tryindesign.jpg" alt="" width="168" height="24" /></a></p>
<p><span class="h1_sub">The following are a few of the great features and benefits of Adobe InDesign:</span></p>
<div id="div1">
    <h3>User Friendly</h3>
		<p>InDesign is a user friendly program. You’ll be up and running making albums quickly and confidently in no time at all.</p>
    <h3>One Document</h3>
		<p>All album spreads are in one document. You can easily view and shuffle them around.</p>
	<h3>Smart Guides</h3>
		<p>Smart Guides makes image alignment easy and accurate.  No more frustration over alignment issues.</p>
	<h3>Smart Spacing</h3>
      <p>Smart Spacing assists in arranging images equidistant from one another easily and accurately.  Again, say good-bye to alignment issues.</p>
    <h3>Retouch on Approval</h3>
      <p>Save time by retouching images after your design has been approved by the client. This is possible because InDesign links to your images. After retouching in Photoshop, Indesign updates the links to your images and you have a retouched album!</p>
    <h3>Drag and Drop</h3>
      <p>Drag and drop multiple images from Adobe Bridge, iView MediaPro, or Photo Mechanic into InDesign.  You can fill up a template in seconds.</p>
   <h3>Small File Sizes</h3>
      <p>Your whole InDesign album is about 1/3 the size of one Photoshop spread. (Comparison based on: 28MB InDesign album with 16 spreads sized 20×10 using an average of 3.5 images per spread and a 96MB 20×10 Photoshop spread with 3 images as smart objects.)</p>
   <h3>Templates</h3>
      <p>Templates are small - 65kb each! Yes, that’s kilobytes. And, each one is fully adjustable with perfect precision down to .0001 inches.</p>
   <h3>File Flexibility</h3>
      <p>Populate frames with Photoshop files of any size. InDesign accepts multiple layered Photoshop files and works with them as easy as it does flattened jpegs. Furthermore, like jpegs, you can open the file up in Photoshop directly from InDesign to make any desired changes.  You can also encorporate vector image, tiffs, Illustror files, and even fill frames with other InDesign files.</p>
   <h3>Non-destructive Editing</h3>
      <p>Want to take a small image in a frame and enlarge to the size of your spread?  No problem.  Enlarge and decrease the size of images all you want. InDesign is linking to the files therefore you can change the image sizes non-destructively until your heart is content.</p>
      <h3>Even Margins</h3>
      <p>Give your albums a refined professional look with even margins and borders.  InDesign centers images on a album page as though it has already been trimmed in the manufacturing process.  This gives your albums a balanced look that compliments your images.</p>
      <h3>Flash Albums</h3>
      <p>Create a flash wedding album to post on your website or blog. You can also customize the page transitions.</p>
    <h3>PDF Book Export</h3>
      <p>Export web sized PDF files with security like print prevention for your clients to preview their album.</p>
      <br />
      <p><span class="h1_sub">And, here’s the bottom line…InDesign is a staple investment in your business that will pay for itself in no time. You’ll be predesigning large albums quickly and easily and that means profit and more free time to shoot.</span></p>
  </div>
<br />
<p><em>(The AlbumsInDesign Scripting Solution for InDesign<sub>®</sub> takes InDesign<sub>®</sub> to a whole new level for photographers or anyone creating graphic layouts.  The Scripting Solution is not an Adobe<sub>®</sub> product and is not included with Adobe<sub>®</sub> InDesign<sub>®</sub>.)</em></p>
<br />
<div id="clearfooter"></div>
	<div id="footer">AlbumsInDesign for InDesign Templates, Scripts, and Tutorials</div>
</div>

I also checked the Spry menu with her IE. Text of the menu disappeared on mouse over. I’m glad Stomme showed me Blake Haswell’s menu. That’s the one I’m using now.

IE6 did the disappearing text thing with Spry, while IE7 didn’t but shifted everything to the right instead of keeping the sub-li’s in a column, and lost the background colour too or something.

If you are using Blake’s, his is just a Sons of Suckerfish (which is good) and then some Javascript on top. IF you are using the Javascript, look on his blog page and I posted a fix to a Gecko (so Mozilla browsers like Firefox and K-Meleon) bug, because Gecko adds together the totals of both :focus and :hover.

So if you hover over a submenu, it’s fine, but then if you click on it, you’ve put the focus there too… and you lose thee menu.

Side note: I noticed that I can make a global change to the menu just by doing a site wide Find and Replace. So, I am not concerned with doing a PHP link to the menu. This is just fine.

Text editors can do so much work for you.

I make new pages by opening the one that’s what I want in vi, making my changes, then :saveas newfilename and I can whip out like 10 pages with the same header/footer/sidebar/menu/whatever with small tweaks. If they all need a change, you can open or edit some whole long list of files and make a small change and do just two commands (next and repeat previous action) and have everything the same in about 30 seconds.
Your editor should be able to do the same thing. It’s a lifesaver!

Thanks.

The page, “Why InDesign” is shifting a handful of pixels to the left. I took all the html out of it and it is not shifting. So, I’ll some of this back in a little at a time to find the culprit:

Are you talking about the fact that on short pages there will be no vertical scrollbar and on longer pages the vertical scrollbar kicks in and thus the layout must move to the left slightly? (This doesn’t happen in IE7 and under as they always have a vertical scrollbar present but just grayed out.)