Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames?

Status
Not open for further replies.
For one reason, it's terrible when a user gets to a page, browses a few pages in, and then wants to bookmark where he/she is.

An example:

- A user goes to anysite.com
- He then clicks on "products"
- He then clicks on "widgets"
- He then bookmarks this page

However, the bookmark holds the url anysite.com, not anysite.com/products/widgets/

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
most times frames are used to maintain common parts of the website like header, nav, and footer. these days the same thing can be done neatly and seemlessly with server side includes or any other server language.

ask the JS crowd how many questions they get on "how do i change the main frame if a function is run in the nav" that's just one example, there are many. Same with server side scripts, they get disjointed.

frames are messy (no argument support needed)

anything you need a frame to simulate, like static nav for example can be done with CSS or DHTML.

Frames in my opinion were a temp solution to a requirement that people had until other solutions could be created.



A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
well-said.

;)

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
thank you :)

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Here here bombboy! :)

Wow JT that almost looked like you knew what you were doing!
 
Thanks again. a simple google search of "frames bad html" will give you all sorts of articles on why frames are icky. here is one from htmldog.com that i thought was amusing.

Frames
Goldilocks thought it would be a really good idea to help herself to a bowl of porridge but then three large carnivorous mammals showed up and threw her out of a window. Frames are bowls of porridge that belong to bears. They might look nice, but it would be quite perilous to go anywhere near them.

Most web sites do not use frames and in general web users are used to a single document as a page.

But if, for some reason, you want to prevent users adding a specific page to their bookmarks or if you want to prevent them recommending a specific page via email or instant messaging or if you want to add a whole other level of complexity to users with disabilities using screen readers who will need to navigate between frames on top of navigating through a page or if you want to confuse the hell out of search engines, go ahead, use frames.

In general, frames do nothing but add complexity and subtract usability.

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
There are some very interesting and valid points there, particularly about the accessibility.
I like the idea of my sites having a static header section and nav bar while the 'main' section moves vertically, is this possible with css etc. A good css resource would be more than welcome. I have used css for basic tasks like uniformity of hyperlinks but nothing else.
Something else to add to the ever increasing list of techniques to learn.
Should I put css before or after Javascript?



Keith
 
Yes, it's possible.

Good CSS resource:
I have noticed no difference between the order of JS and CSS, as long as they're both in the <head></head> tag.

Here is an example of what I think you're trying to accomplish. It's quick and dirty, but it should give you the general idea. Making the left and right columns flow evenly takes some more work, but this is the general idea.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]

<html>
<head>
<title>new document</title>

<style type="text/css">

#container {
    border: 1px solid #ccc;
    width: 600px;
    margin: 0 auto;
}

#header {
    height: 60px;
    background-color: #0000cc;
    color: #fff;
    font-size: 24px;
}

#nav {
    width: 100px;
    float: left;
    background-color: #333;
    color: #ccc;
}

#nav ul {
    list-style: none;
    margin-left: 10px;
    padding: 0;
}

#body {
    overflow: scroll;
    height: 100px;
}

</style>

</head>

<body>


<div id="container">
    <div id="header">Here is the Header!</div>
    <div id="nav">
        <ul>
            <li>Nav Item 1</li>
            <li>Nav Item 2</li>
            <li>Nav Item 3</li>
            <li>Nav Item 4</li>
        </ul>
    </div>
    <div id="body">
        Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content Main content
    </div>
</div>


</body>

</html>

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top