Just starting out. I have taken one of Dreamweaver’s HTML layouts. I’ve manged to add a header and underneath I have a row of text (words)for my navigation bar. What I am wanting to do is have the new pages appear underneath the header and navigation (so have the nav and header fixed).
However when I have tried to create an anchor in the space where I want the page to appear and link it to make first page (Photography.html) the new page still appears in a new window. I have created an anchor and called it “photographyimagepage” and put this in the target but it’s not working??!!
Ideally, we need to see your page to understand what’s going on here … although it sounds like this is a fight with Dreamweaver rather than a fight with HTML. Programs like this are not well liked around here, to be honest. The ideal is to learn how HTML, CSS etc. work, so that you can write your own code and not depend on these editors that chuff out a lot of bloated and nonsensical code. This is a problem you don’t need to have, as page layout with code is actually quite simple.
Can you show all your code? I cant visualize exactly what you are saying… but I think you are saying when you click on your link a NEW window opens displaying the target window (whilst the previous page still open).
If tahst the case make sure that TARGET (in properties window) is not set to anything OR it set to “_self”. none of the things you have mention really have any effect on anything.
I could be misinterpreting your wording but It also seems you have the concept of how a web site works all wrong. ( am assuming there at least are two documents involved) . When you click a link, by default, a new html document is loaded into that window. this means if you want the navigation to be there you must code it into BOTH document, it is really not “moving” anything… unless you are trying to do it with frames… but that’s an ANTIQUATED AND ABANDONED TECHNIQUE…DONT DO IT!!
The other possibility is that you may have been talking about jumping within the same html doc. in which case what you need to do make sure you DONT have a target set. Now when you click a link the page will jum straight to the element with that ID. You don’t even need to make an anchor.
so:
I you will notice I put the links in a list (and gave it a class name) as it is best practice to do so. But what you wanted was the menu to remain at the top, you say!
That’s where you need to use CSS ( in thw WYSIWG you would make a “layer” but… really the WYSIWG is not what you want to learn to use)
Anyway, go to the source code.Find the STYLE tag ( that contains your CSS) add something like
.mainNav {position:fixed; top:0 ; left:0;}
and you will see that your nav links remain at the top left when you click or when you scroll.
I know iut sounds convoluted, but i hope that helps.
What I want to do can be seen on this example, however I am wanting the navigation bar running horizontally across the top instead of vertically down the side. http://ourspanishflat.com/
So when a navigation tab is clicked the new information appears in below the header.
I use to dabble with dreamweaver about 10 years ago when frames and tables were used and so trying to get up to date is learning curve but I’m enjoying it. I’ve been using dreamweaver in split mode and basically editing the code but finding it useful to see the result.
Anyway back to the question in hand…speaking to others they have said that what to use now is a div with a position attribute set to fixed? As I understand these div’s have replaced tables and can be fixed or moveable.
I hope this helps to explain what I’m asking, anymore idea’s ?
forget what i said I really didn’t get what you were trying to do
Frames and tables ( tho popular in the past were wrong to use than for the same reason they are now)
a) Tables are for tabular data. if you you have a table of info then BY ALL MEANS USE TABLE other wise no.
b) Aside from the new development of mobile devices ( who could have predicted that) frames are disadvantageous because each frame is an individual HTML document. with the advent of search engines, for example, a user could be sent to just your masthead frame but not necessarily your web page. You wouldn’t want that. There is also navigation/ browser history issues ( not that no matter what link you click the url still reads index.html)…there screen readers accessiblity issues, etc etc
c) so it’s really not that table/frames have been replaced by divs… is just now it has been realized that the a page should be structured semantic info and not just ‘jerry rigged’ to look a certain way, after that you can use CSS to style a look.
I understand the appeal of frames ( in a way) . For someone w/o knowledge of php or other server side languages it SEEMS to allow for not having to repeat code . but you really have to rethink your strategy.
Anyway, first get rid of frames.
second understand that that will require you to code the navigation, masthead, footer, etc repeatedly into each document. it’s just the way it is.
Continuing the lesson … navigation is best coded as a LIST of links. Which you can then position with CSS to suit your needs and style.
Ugh… I was too slow and couldn’t add my revised SAMPLE HTML and CSS in time.
anyway here is a proof of concept for what I was saying above. You’ll also note how much slimmer the code is and the SEMANTIC POTENTIAL ( as there can be no semantic w/o real content)