Re: Links to Pages within Frames
- From: Stevie D <stevie@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 09 Aug 2005 20:47:45 +0100
Martin Underwood wrote:
> From a designer's point of view, it's far easier to design a page that
> just contains the body of the information, and let the frames handle
> the separate navigation bar. Also, if you add to or change your
> navigation bar, you don't have to make the same change on every page,
> which you would on a non-frames site which positioned its navigation
> bar in a separate cell of a table.
That is one of the reasons why I still use frames on my primary
website - because at intervals I need to add or delete a link from the
navbar, and I can't be bothered to do it on 150 pages and then have to
upload them all... (This is true whether you use the abomination known
as a layout table, or whether you do it properly with CSSP).
One key downside to this is that the navbar is then static. On another
site I wrote, the navbar changes - the current page is highlighted,
and a submenu for the current section is shown (where relevant). On my
primary site that isn't an issue, but on other sites it can be. Yes,
you can have a series of different nav frames, one for each section,
and call the appropriate one at the appropriate time, but you are then
still left with the "active link to current page" issue.
> Or is there some cunning way of embedding a link to another page
> within the cell of a table so that a single menu can be inserted in
> all pages, similar to the mechanism for frames?
Get this whole "table" thing out of your head!
What I have seen suggested, but not tried, is, eg
div#nav object {
position:fixed; [wherever]
height:100px;
width:100%; }
<div id="nav"><object data="navbar.htm" type="text/html">
<ul><li><a href="home.htm">Home</a>
<li><a href="contents.htm">Contents</a>
<li> [two or three other key sections]
</ul></object></div>
This embeds the external file "navbar.htm", and positions it on the
page (or within the positioned <div id="nav"> if you prefer) and fixes
the height and width. It should be possible with CSSP to use fixed
positioning to emulate frames, but with the poor support for height
and for position:fixed (ie, IE still scrolls it), that isn't easy to
do just yet.
If the browser does not support embedded objects, the user will simply
get a list of the key site navigation links, from which they should be
able to get to the rest of the site.
<snipp-ex>
>> A max-width in em units works great in web-compatible browsers, and
>> any others should just adjust their window width to suit.
>
> That sounds an interesting idea. Is this a <body> attribute to the
> page? Does it allow control over whether the restricted-width page is
> left-, right- or centre-justified within the available space of the
> browser? DOes text re-wrap if the browser is made narrower than the
> stated width?
Max-width, I think, (like min-width) is a CSS2 property. What this
means is that modern web browsers support it but IE doesn't.
It is used in the same way as "width", but if the available space is
less than the maximum width as specified, it collapses and wraps it to
fit.
In other words: <div style="max-width:600px;">Lorem Ipsum...</div>
would show up as:
full width for viewport <= 600px,
600px for viewport wider than that.
This is different to simply using "width", which would invoke
horizontal scrolling if the available space was less than (in this
case) 600px.
> The main problem with using tables to constrain the width is all those
> American sites which carefully limit the text to a width that will
> just print on American "letter" paper, but will nicely miss off the
> last word on each line when printed on A4!
Which there is absolutely no excuse for. By using CSS, you can give a
completely different print style***, so that the navigation is
hidden when printed, and the text is reflowed to fit the page width
rather than fitting to any constraints that were imposed on the
screen. Have a look at the two stylesheets for
http://www.pocklingtonbridgeclub.freeserve.co.uk/latest.htm
--
Stevie D
\\\\\ ///// Bringing dating agencies to the
\\\\\\\__X__/////// common hedgehog since 2001 - "HedgeHugs"
___\\\\\\\'/ \'///////_____________________________________________
.
- References:
- Re: Links to Pages within Frames
- From: Pyromancer
- Re: Links to Pages within Frames
- From: Martin Underwood
- Re: Links to Pages within Frames
- From: Gazza
- Re: Links to Pages within Frames
- From: Don Aitken
- Re: Links to Pages within Frames
- From: Stevie D
- Re: Links to Pages within Frames
- From: Alan J. Flavell
- Re: Links to Pages within Frames
- From: Martin Underwood
- Re: Links to Pages within Frames
- From: Alan J. Flavell
- Re: Links to Pages within Frames
- From: Martin Underwood
- Re: Links to Pages within Frames
- Prev by Date: Re: Links to Pages within Frames
- Next by Date: Re: Frames: links from one page to another are ignoring "target" attribute
- Previous by thread: Re: Links to Pages within Frames
- Next by thread: Re: Links to Pages within Frames
- Index(es):
Loading