Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-17-2008, 05:59 PM xhtml and frames
Average Talker

Posts: 16
Trades: 0
hey guys

ive been doing very light web design for a few years, in the past i have always been lazy and used premade templates. I used to use frames for every page i did.

now i want to learn how to do it right. im trying to stick with all w3c xhtml strict coding from now on, and do everything by hand (with notepad)

the one thing i cant seem to find a good answer for is framing type codes for xhtml. i used to make one main page with a sidebar, and set a frame in the center, making all my links open in the frame. it was simple and kept work to a minimum. i read that frames are now being phased out, and that they are looked down on in the business. my question is, what is an alternative to using frames? is there a way to specify an ID for a block element and link directly to that ID?

i hate the idea of having to go page by page, making the same changes over and over again. any help or input is appreciated
Motosaki is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-17-2008, 07:22 PM Re: xhtml and frames
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
is there a way to specify an ID for a block element and link directly to that ID?
Yes, but you need javascript.

Quote:
what is an alternative to using frames?
Why do you need one at all ? You have to code the content for each page anyway. If you're looking to not have to repeat navigation on every page, then use server side includes.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-17-2008, 09:07 PM Re: xhtml and frames
Average Talker

Posts: 16
Trades: 0




so to click a link on the sidebar and have it open in the centercontent, there is no way to do it without javascript or SSI? (with xhtml standards)
Motosaki is offline
Reply With Quote
View Public Profile
 
Old 09-17-2008, 11:04 PM Re: xhtml and frames
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
SSI has nothing to do with making content "pop" into a section of a site without refreshing the other sections, that can only be done with JavaScript. SSI is for including sections of sites (such as header, footer, navigation), that are shared by many pages. By organizing your site with included files, you may simply build seperate pages which share the same sidebars, headers, etc. If the shared sections have the same images, styles, etc, they will be cached, and the illusion of them remaining steady will be accomplished.

It is almost always more proper to seperate a site into pages rather than pull in a bunch of content with JS.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-18-2008, 09:20 AM Re: xhtml and frames
Average Talker

Posts: 16
Trades: 0
Quote:
Originally Posted by wayfarer07 View Post
If the shared sections have the same images, styles, etc, they will be cached, and the illusion of them remaining steady will be accomplished.

It is almost always more proper to seperate a site into pages rather than pull in a bunch of content with JS.

So the correct way is to have the site in the picture above be a seperate html file, and then the sidebar links to identical html files (with the exception of the content) ?

what if you were to add a link to the sidebar, wouldn't you have to go file by file adding it over and over again? that's what i'm confused about. maybe it's the norm but coming from frames it seems like a lot of unnecessary work. if you were to add a link to your sites layout how would YOU do it?
Motosaki is offline
Reply With Quote
View Public Profile
 
Old 09-18-2008, 11:49 AM Re: xhtml and frames
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I write all my sites in PHP, so my pages are organized something like this:
PHP Code:
<?php include "top.php"//document type, encoding, etc?>
<title>Example</title>
<!--meta, etc-->
<?php include "header.php"//links to CSS files, scripts, etc.  Opening <body> tag and top part of navigation, if it is at the top.?>
<div id="page">
<!--HTML GOES HERE-->
<?php include "sidebar.php"//just like it sounds?>
</div>
<?php include "footer.php"//a shared footer, closing </body> tag, scripts at bottom of page like Google Analytics?>
What happens when you pull in stuff on the server via includes, is just that whatever is in the file replaces the <?php include ""?> statement as seen above. Depending on your programming skills, this content could vary a little from page to page, but the important point is that you are able to consolidate certain common content areas into just a few files, so that when and if they need to be updated, you will not have to cut and paste thoughout the site, which, as you have pointed out, can be a real pain.

What you see above is basically a "template" for a site. It can vary a little from page to page, but it allows you, in broad strokes, to create uniformity throughout the site.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to xhtml and frames
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17312 seconds with 12 queries