13 replies [Last post]
VigilantPost
VigilantPost's picture
Offline
newbie
Last seen: 15 years 46 weeks ago
Joined: 2007-03-24
Posts: 6
Points: 0

Hi there,

after a few months or so of off and on self-debate, I've decided to start building a website. I'm a child of the days of pure, raw HTML; before those silly things like DreamWeaver22 (or whatever it's at) came out. Only, I'm far behind the times, learning not too long ago about css.

The problem I'm having is the relation of css' div tag to html's frame. With the frame tag, it was possible to link a target to (for example) main.htm, and take that one frame to google.com or whatever you needed. With the div tag, all I seem to know is that I can change it's background color (yahoo?).

If there is a way to target a specific div to link to a new page, what would it be? Any enlightenment on the issue would be so greatly appreciated (assuming my bumbling rambles make more sense to you than they are to me).

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 4 years 14 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

my guess is that what you

my guess is that what you mean is, with frames you could have a header/topnav section in the top frame, navigation in the left frame and changing content in the middle.

We would now do this using something like php to make server side includes. Each section is in there own file and the server includes them into the page and the visitor doesn't see anyhting unusual. However, each page has to have its own file.

Given server processing speeds and broadband, it is now the prefered way of doing things.

Juts search this forum for my name and php includes.

VigilantPost
VigilantPost's picture
Offline
newbie
Last seen: 15 years 46 weeks ago
Joined: 2007-03-24
Posts: 6
Points: 0

ah-hah! ClevaTreva, thank

ah-hah! ClevaTreva, thank you so much. It seems I'll have to purchase a domain to actually 'see' my progress, since php is more server based than anything else. I never thought about needing php (this nightmare just gets worse and worse, heh - I'll conquer it)..

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 48 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

As you've been away for a

As you've been away for a while, your first step will be to reintroduce yourself to html, but this time without table layouts and without frames. Both those methods are obsolete.

You must unlearn the old methods, and apply yourself to marking up your content with well structured, semantic html, totally without regard to presentation. Once you have marked-up, but unadorned content, the css is simply added on top.

It is the separation of structure and presentation that allows for changes in how every page in the site looks, all by changing one css file and not touching the html layer.

Frames have little practical value today, if they ever did. Caching browsers means that only new material + re-used text is downloaded, and text is too light weight to worry about. The idea of a re-used file, say, for the navigation is handled by server side includes—either by standard <! declarations or scripted includes. Frames are a clumsy, search-engine unfriendly kluge.

Start marking up your page. If you hit a bump, ask. There's always someone ready to step up with help.

//edit: CT must live here, the way he keeps coming in ahead of me. I know, it's the six hour head start. No, wait. It's just five hours since our stupid Congress put us on DST early.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 48 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

VigilantPost wrote:ah-hah!

VigilantPost wrote:
ah-hah! ClevaTreva, thank you so much. It seems I'll have to purchase a domain to actually 'see' my progress, since php is more server based than anything else. I never thought about needing php (this nightmare just gets worse and worse, heh - I'll conquer it)..

Nah. You can install the Apache web server + php + MySQL DBMS on your own local machine. As far as I know, all the more experienced hands work this way. I certainly can't imagine doing without.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 4 years 14 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Yeh, I have apache php mysql

Yeh, I have apache php mysql etc on XP.

We went forward an hour this morning. But I'm a vampire, so I don't sleep Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 4 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Here's the easiest and best

Here's the easiest and best to install ,all packaged up

http://www.apachefriends.org/en/xampp.html

And I refuse to have an hour of my life stolen from me so I shall be staying on winter time, not loosing an hours sleep, damn cheek!

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

VigilantPost
VigilantPost's picture
Offline
newbie
Last seen: 15 years 46 weeks ago
Joined: 2007-03-24
Posts: 6
Points: 0

Ah, great. Thank you, Hugo

Ah, great. Thank you, Hugo - downloading it now. I found an old book on PHP sitting in my closet; must be from my high school days (though I honestly don't remember PHP being part of it). Looking through this, I think I'm going to need a lot of asprin.

VigilantPost
VigilantPost's picture
Offline
newbie
Last seen: 15 years 46 weeks ago
Joined: 2007-03-24
Posts: 6
Points: 0

And ok, I think I've got a

And ok, I think I've got a php related question (if I was supposed to create a new thread, I'm sorry. I'm just used to conserving board space).

But, I get that you have the main page, and a selected "area" of the page (I'm assuming a div) that's targeted as a new document, like if I had a main content portion of the page, a clicked link would only target that one area (much like our beloved frames, haha). Through the book I'd found and searching the net, I haven't quite found out "how" to target a selected area, exactly.

I'm used to something like examle, and I've tried dedicating my main content div a name, targeting it .. only with no luck.

The code I'm using is test.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 4 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It's best to get out of the

It's best to get out of the 'Frames' mindset altogether, do not worry about targeting areas as frames did. It takes no time to reload the page and with caching of files reloading the page isn't a problem.

What you may have a requirement for is to not have to update certain sections of your site like Nav lists repeatedly and across many pages, here you can cut and remove that section of html to it's own file and then pull it back into each page using 'Includes' (PHP or SSI) this way you only have to update/ make changes to the one file rather than each and every page on the site, invaluable if the site has many static pages.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

VigilantPost
VigilantPost's picture
Offline
newbie
Last seen: 15 years 46 weeks ago
Joined: 2007-03-24
Posts: 6
Points: 0

Alright, I think I'm

Alright, I think I'm starting to get a hang of this. Looking through the book I found, I pieced this together..



VigilantPost.com





<?php include ("header.html") ?>



<?php include ("main.html") ?>


I seem to be having troubles with Apache, though. I've got it downloaded and installed; but I'm still unable to view my index.php file. It's not finding the program needed to view it, though I'd have thought it would just open in IE.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 41 weeks 1 day ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

You'll need to save the .php

You'll need to save the .php files in the apache folder. You can't just install apache and run php files from your "My Docs" for example, they need to be moved into the program's folder.

I think.

Verschwindende wrote:
  • CSS doesn't make pies

VigilantPost
VigilantPost's picture
Offline
newbie
Last seen: 15 years 46 weeks ago
Joined: 2007-03-24
Posts: 6
Points: 0

Great! I can't believe it's

Great! I can't believe it's actually working! Thank you everyone - I'd have never been able to start without you help.

Gravesent
Gravesent's picture
Offline
Enthusiast
Bucharest - Romania
Last seen: 9 years 34 weeks ago
Bucharest - Romania
Timezone: GMT+3
Joined: 2007-03-23
Posts: 71
Points: 32

Also have a look at

Also have a look at http://wampserver.com/en/index.php I for one like it more than xamp (not that there's anything wrong with it).