what am I doing wrong?

Profe

New Member
This is my first time working with frames and I've come across a problem I didn't forsee and have no idea how to solve. Even though I've set the margin to 0 in all frames I still get a margin on the top of the website. How can I get rid of it.

The other problem I'm having is with the spry menu. All 4 buttons should look like the photogallery button, but the styles aren't applying to the buttons that contain drop down menus when viewed in chrome.(they look ok in IE as far as i'm concerned)

Frameset code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</head>

<frameset rows="103,*,80" frameborder="no" border="0" framespacing="0">
  <frame src="topframe.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frame src="toolbody.html" name="mainFrame" id="mainFrame" scrolling="No" title="mainFrame" />
  <frame src="bottomframe.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
</frameset>
<noframes><body>
</body>
</noframes></html>
TOP FRAME CODE
Code:
<!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>Untitled Document</title>
<link href="../aicon.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="tooltopbar">
<div id="logo"></div>
<div id="tooltopimage"></div>
</div>
</body>
</html>
properties for <body> from the .css
Code:
body {
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;

layoutba.jpg
 

Profe

New Member
Just curious... why are you wanting to use frames? Not bashing, but they can present a LOT of problems for you.
client wants the top and bottom to stay the same the whole time. Also the content area should needs to be able to adapt to the browser height and I don't know exactly how else to do it.
 

bigcougar

New Member
All 4 buttons should look like the photogallery button, but the styles aren't applying to the buttons that contain drop down menus when viewed in chrome.(they look ok in IE as far as i'm concerned)

The ones that have a drop down menu are a different class. Find this class in the css sheet and apply the same design to it.
 

Profe

New Member
I tried that, I also tried removing their class tags, since the photo gallery button didn't have one.

Spry menu .css
@charset "UTF-8";

/* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */

/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

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

LAYOUT INFORMATION: describes box model, positioning, z-order

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

/* The outermost container of the Menu Bar, an auto width box with no margin or padding */
ul.MenuBarHorizontal
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
cursor: default;
width: 720px;
position: absolute;
top: 0px;
background-repeat: repeat-x;
height: 22px;
background-image: url(../images/layout_02.jpg);
}
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
ul.MenuBarActive
{
z-index: 1000;
height: 22px;
}
/* Menu item containers, position children relative to this container and are a fixed width */
ul.MenuBarHorizontal li
{
padding: 0;
list-style-type: none;
font-size: 12px;
position: relative;
text-align: left;
cursor: pointer;
width: 150px;
float: left;
font-family: Verdana, Arial, Helvetica, sans-serif;
height: 22px;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
left: 60px;
}
#cpp {
width: 150px;
}

/* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
z-index: 1020;
cursor: default;
width: auto;
position: absolute;
left: -1000em;
height: 22px;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
{
left: auto;
height: 22px;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
width: 215px;
height: 22px;
}
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
{
position: absolute;
height: 22px;
margin-top: -5%;
margin-right: 0;
margin-bottom: 0;
margin-left: 95%;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
{
left: auto;
top: 0;
}

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

DESIGN INFORMATION: describes color scheme, borders, fonts

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

/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
{
border: 1px solid #CCC;
}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
display: block;
cursor: pointer;
background-color: #C4D2D5;
color: #333;
text-decoration: none;
background-image: url(../images/layout_02.jpg);
padding-top: 0.5em;
padding-right: 0.75em;
padding-bottom: 0.5em;
padding-left: 0.75em;
height: 10px;
vertical-align: middle;
text-align: left;
}

/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
{
background-color: #33C;
color: #FFF;
}
/* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
{
background-color: #33C;
color: #FFF;
}

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

SUBMENU INDICATION: styles if there is a submenu under a given menu item

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

/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarDown.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarRight.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarDownHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarRightHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}

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

BROWSER HACKS: the hacks below should not be changed unless you are an expert

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

/* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
ul.MenuBarHorizontal iframe
{
position: absolute;
z-index: 1010;
}
/* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
@media screen, projection
{
ul.MenuBarHorizontal li.MenuBarItemIE
{
display: inline;
f\loat: left;
background: #FFF;
}
}

Spry menu html
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="#">Services</a>
<ul>
<li><a href="tooling/advtl.html">Advanced Tooling and Fixturing</a></li>
<li><a href="tooling/vndrman.html">Vendor Managed Inventory</a></li>
<li><a href="tooling/precman.html">Precision Manufacturing</a></li>
<li><a href="tooling/partprot.html">Part Prototyping</a></li>
<li><a href="tooling/autom.html">Automation</a></li>
<li><a href="tooling/inject.html">Injection Molding</a></li>
</ul>
</li>
<li><a href="#">Resources</a>
<ul>
<li><a href="tooling/qualins.html">Quality Control Laboratory</a></li>
<li><a href="tooling/desana.html">Design and Analysis Laboratory</a></li>
<li><a href="tooling/equip.html">Equipment</a></li>
</ul>
</li>
<li><a href="gallery.html">Photo Gallery</a> </li>
<li><a href="#">Company Profile</a>
<ul>
<li id="cpp"><a href="#">About Us</a></li>
<li id="cpp"><a href="#">The Team!</a></li>
<li id="cpp"><a href="#">Contact Us</a></li>
</ul>
</li>
</ul>
 

d a v e

New Member
if i was you i would talk your client out of using frames - actually if they trust you as the professional to do your job and take your advice then i would just refuse to do it.

i don't know where they heck they get these ideas from - maybe they could try explaining to your why they want frames (why does the navigation etc have to 'stay the same' it pretty much does that anyway and really if frames were such a great idea then everyone else would be using them. you can point out tons of professional sites (and /or things they might use like amazon etc) to show that not one uses frames.
http://apptools.com/rants/framesevil.php

if it was me and they didn't have a good case for using them (and i can't even think of a good one so i'm sure they can't) i would simply refuse to do it.
 

Profe

New Member
Fine I'm convinced, and I guess I'll take it upon myself to convince the client not to use frames.

Now, I've been looking for alternatives and I found a script to change the contents of a div on click, looks like a nice alternative, but I can't get it to work.

The script can be found here 8th post down by Bill Posters. I have little experience with scripts so I don't understand exactly where I have to put this. I pasted the script into a blank html file to test it out but I can't get the links to change the content.

Can I get an explanation of how this script works and where I have to place it?
I know the 2nd code he posted goes in the body and I suppose the first part goes in the head, as well as the css part, but I don't know about the rest.
 
Top