Another Frames Question

W

Wayne

I have been reading that frames are evil for a very long time, however,
I have a site with documents on it and would like users to be able to
print them without other content. The documents are about 20 pages
long. I have two framesets, one with the menu and a banner, ane the
main for content. Is there a better method? the url is
www.glenmeadows.com for those that would like a peek.

Wayne
 
M

Mark Parnell

I have a site with documents on it and would like users to be able to
print them without other content.

Look into print stylesheets.
Is there a better method?

<link rel="stylesheet" src="print.css" media="print">
^^^^^^^^^^^^^
 
N

Neal

I have been reading that frames are evil for a very long time, however,
I have a site with documents on it and would like users to be able to
print them without other content. The documents are about 20 pages
long. I have two framesets, one with the menu and a banner, ane the
main for content. Is there a better method? the url is
www.glenmeadows.com for those that would like a peek.

Wayne

Use CSS.

@media print {

div#menu, div#banner {display: none;}

}

See http://www.w3.org/TR/CSS2/media.html#x0 for more info.

Basically, have everything in divs according to page function. The content
div is all you want printed, so the other divs are set to not print as
above.
 
B

brucie

in post: <
Wayne said:
I have been reading that frames are evil for a very long time, however,
I have a site with documents on it and would like users to be able to
print them without other content.

1. dump the frames
2. setup a style sheet for the printer

for example if you don't want your menu printed you can hide it from the
printer:

@media print{#menu-stuff{display:none;}}

Media types
http://www.w3.org/TR/REC-CSS2/media.html

3. warn and let the visitor decide if they want to use your printer css
or not. they may get upset expecting what they see to print but getting
something else. a simple bit of scripting can do it.
 
W

Wayne

brucie said:
in post: <


1. dump the frames
2. setup a style sheet for the printer

for example if you don't want your menu printed you can hide it from the
printer:

@media print{#menu-stuff{display:none;}}

Media types
http://www.w3.org/TR/REC-CSS2/media.html

3. warn and let the visitor decide if they want to use your printer css
or not. they may get upset expecting what they see to print but getting
something else. a simple bit of scripting can do it.
Thank you. I didn't realize that was an option. Guess I have a lot
more reading to do.

Wayne
 
R

Richard

Wayne said:
I have been reading that frames are evil for a very long time, however,
I have a site with documents on it and would like users to be able to
print them without other content. The documents are about 20 pages
long. I have two framesets, one with the menu and a banner, ane the
main for content. Is there a better method? the url is
www.glenmeadows.com for those that would like a peek.

http://1-large-world.com/samples/sample1.html

Remove the left sidebar and you have your site without frames.
With a little education on the use of z-index, you could have just one page
for each menu item.
Z-index "hides" an item until it's needed.
 
S

Steve Pugh

Richard said:

Is the content meant to be _below_ the menu? It's a very odd design if
it is. And the order when CSS is disabled (menu, header, content,
footer) is less than ideal as well.
Remove the left sidebar and you have your site without frames.

Gosh that's useful. And how exactly does this solve the OP's problem
with printing? (Don't bother, the correct answer using print
stylesheets has already been given.)
With a little education on the use of z-index, you could have just one page
for each menu item.
Z-index "hides" an item until it's needed.

You really are obsessed with z-index aren't you? z-index does not
'hide' elements at all. It stacks them in layers, which may or may not
hide part or all of an element depending on several factors. To hide
elements use display: none; or visibility: hidden;

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top