I went from pages made by Album Express 3.5 Trial version, a photo gallery tightly-constructed with nexted tables (maybe that makes sense for a program that generates written code) to "merely" a WYSIWYG editor (NVU), when I wanted to change photos around. Cutting and pasting photos of different sizes made a mess of tables, haha!
Is <div></div> related to CSS? Because the code generated by NVU uses that, as in: "<div style="margin-left: ...." - so it looks to me as though style (CSS?) is creeping in here <g>.
My impression, after seeing the tables approach, then (if this has anything to do with CSS, I don't know) - this "<div [various stuff] > more stuff </div> is that <div></div> claims or defines screen real estate, so to speak. Which is also what tables do, but the <div></div> looks more flexible - is it? And my other question (for now; I'm full of it <g>) is about style, next post.
Sun, 05 Dec 2004 14:25:37 (PST)
rhsunderground
12-05-2004, 04:43 PM
oh my, how much better are div's than tables. you can do things with div's exponentially better than tables. they are also TONS more accessible, as well.
CarolW
12-05-2004, 04:58 PM
Originally posted by rhsunderground
oh my, how much better are div's than tables. you can do things with div's exponentially better than tables. they are also TONS more accessible, as well.
Well, no kidding! I sweated with the tables for daze and daze. <div>s and </div>s, though, appear to be letting me edit code without messing up my pages! Only *I* can mess them up, and the results really were quite hilarious, as I cut and pasted my own home-grown graphic (Paint Shop Pro, how I love it) "Prev [left-arrow] <==> Next [right-arrow]" - but, because I was in a WYSIWYG editor, where even if you go to the source code window, you really can't see what you're doing, I messed up the link information quite thoroughly.
It was only yesterday I decided to throw out the tables and start from scratch (but using the WYSIWYG NVU - I still can't do without that) - whereupon not only <div></div> appeared, along with "style" definitions, but even a trace of javascript!
postamble, to me, sounds like a nice hot cup of tea after a (r)amble with the dogs.
Where did they get that? Oh! PRE-amble, POST-amble, yeah!
So it does make real estate? A place to work in, that's flexible and accessible? Looks that way!
Sun, 05 Dec 2004 14:58:11 (PST)
rhsunderground
12-05-2004, 05:09 PM
well beware that as you start to use javascript that you never use more than you need - that gets very annoying very quickly. and don't have your website rely on javascript for something important, such as navigation. that cuts down on the users several ways, such as browsers and people that have JS disabled.
CarolW
12-05-2004, 05:28 PM
Originally posted by rhsunderground
well beware that as you start to use javascript that you never use more than you need - that gets very annoying very quickly. and don't have your website rely on javascript for something important, such as navigation. that cuts down on the users several ways, such as browsers and people that have JS disabled.
Oh, I'm sure you're right; I didn't even put it there; NVU did <g>. I haven't figured out yet what it's doing, nor even where it is! But I'm looking at parts of the code now, as I edit to clean up the links messes, and I might catch on to where it is and sort of what it's trying to do. I might be able to shed it; I don't know. I noticed various instructions on how to shunt a browser off if it isn't able to cope with javascript, not that I'd know how to implement that, but I expect I'll learn!
But I also think I understand better how to ask my question about <div></div>, because as I edit the files I messed up, I need to do it correctly, if possible.
I'll try to ask in my next post.
Sun, 05 Dec 2004 15:26:38 (PST)
CarolW
12-05-2004, 06:31 PM
Let me see if I can summarize this correctly; then maybe somebody can help me with my current specific problem.
I have a main photo-gallery page with thumbnails only; each thumbnail links to a sub-page (html), which contains the "full-size" (by web standards) photo, along with some text. The sub-pages, then, are "XYZ.htm" for photo XYZ.
The original Album Express version had what I thought was a very ugly:
"THUMBS ::: ==> NEXT"
kind of arrangment. But it was missing a "PREV," too, and I wondered why! I'm used to seeing (and using) a "PREV" also, to go backwards as well as forwards. So, since I was dumping my Album Express page with its tables, anyway, I thought I'd try to put "prev .... next" into my sub-pages. And wow; did I make mess? Yes. But I think it's fixable.
Instead of "THUMBS," I merely put in a kind of "back" button without the button (a simple link back to the main thumbnails page), and I just stuck it in there, not connected to anything, at the bottom or top of each sub-page. I know if I'm browsing, and suddenly decide I want to go back, i like having the back-link at the top of the sub-page. but I seem to have put it at the bottom last night, as an afterthought - bad planning!
When the back-link is at the top, below that, I have my
and the left-arrow image has a link on it to connect to the previous SUB-page (same order as the thumbnails), and the right-arrow image has one to point to the next image. (duh!)
But when I cut and pasted in the WYSIWYG editor, first, I pasted the same graphic-with-link into each of the sub-pages, and then forgot to check and fix the link contents.
But also, I seem to have run into, and perhaps altered, <div></div> structures. So I need to know where the <div>s and </div>s belong, so I can place them properly, or past the other stuff properly between them, or before or after them, if that's what's needed.
Therefore; here's a kind of mock-up for a sub-page. Where do the <div>s and </div>s go? I seem to have a main <div></div>, and one nested one, on each subpage. Or - oops - it looks as though I have two <div></div>s but they're not nested; one follows the other!(Is that what's caled "inline"?)
(And would I be right to assume that the purpose of <div></div> is to contrain an area of the page so the different page areas don't interfere with each other?)
(And, of course, each <div></div> has to fit on the page! no matter what browser is being used! - I have four browsers to test with: my default, which is Opera, MSIE of course, FireFox, and Netscape 7.2. I'm brand new to Opera, FireFox and Netscape, and you know what *that* means - I didn't even dare try any but IE until I got brave about a month ago!)
MOCKUP for a sub-page with the full-size photo
DOCTYPE
<head></head>
<body [with all sorts of stuff like background and style stuff]>
[link to return to thumbnails (main) gallery page]
[NVU put <div> here]
left-arrow with link to prev; right-arrow with link to next
NVU put </div> here
So, that would be the first <div></div> on each sub-page; the whole thing merely contains the sub-page's sideways navigation links. (Up-navigation is provided by my link back to the main (thumbnails) page, and that part appears not to have any <div></div> stuff; after all, I stuck it in manually, myself - should that link, in effect, a back-button, be inside a <div></div>?
[full-size photo]
Then comes text, my caption, or rather, pseudo-caption, because I don't call it one. It seems NVU put another <div> at the beginning of the caption, but really, I added the caption manually, and that <div> may have simply been stuck in right after I put the image onto the page. So, because I put the (caption) text in myself, I don't know whether NVU thinks my text should be part of a <div></div>, or be constrained in one, or even perhaps have a <div></div> of its own, without apparent relation to the earlier <div></div> that is the graphic pair of links to prev and next.
So - should these two different <div></div>s be somehow related, connected, or nested? Or can each be standalone, depending only on its position on the page- in text, so to speak - for how it's controlled - does it kind of float or drift around the page as needed according to what the browsers do?
In my yesterday's versions, which I'm editing now, at least one sub-page starts the "caption" with <div> (just before the caption-text), and because I had my UP-link (return to main page) at the bottom of the sub-page instead of at the top, where I prefer it (what ever possessed me to put it at the bottom!? I have no idea!) - the </div> occurs only after the up-link. Should it be before the up-link (if I were to leave the up-link at the bottom of the page, but I plan to move it to the top.
I haven't done that mock-up so well, have I! Let me try a summary of it:
----------
DOCTYPE
<head></head>
<body [backgound/links colors and style info>
[Do I put my link back to main page here? before the <div>? Or perhaps add another <div></div>? Or do I start with the <div>, follow that immediately with my link back to the main page, and then follow that with the navigation-links I show next? - that is, right after the next <div>? That would look very confusing to me; I feel as though the line below doesn't want to be fiddled with.]
<div> [prev-next navigation area]</div>
image
<div>
caption of sorts (not called a caption)
[link to main page, or pseudo-back-button, is currently here; I plan to move it; see above]
coments, remarks (text)
</div>
</body>
</html>
------------
Should those last comments and remarks be outside the ending </div>, or stay where they are, or have a <div></div> of their own?
Sun, 05 Dec 2004 16:30:44 (PST)
rhsunderground
12-05-2004, 07:00 PM
that's a whole lotta post :p
why don't you try the following, and see if this works for you:
DOCTYPE
<html>
<head>
<title>Picture 2</title>
</head>
<body>
<div style="text-align:center">
<a href="picture1.html"><img src="previous.gif" alt="Previous Image" /> Previous</a> ¤
<a href="index.html">Main Page</a> ¤
<a href="picture3.html">Next <img src="next.gif" alt="Next Image" /></a>
</div>
<div style="text-align:center">
<img src="image2.jpg" alt="Image 2" />
</div>
<div style="text-align:center">
<p>Isn't this a beautiful caption?</p>
<a href="picture1.html"><img src="previous.gif" alt="Previous Image" /> Previous</a> ¤
<a href="index.html">Main Page</a> ¤
<a href="picture3.html">Next <img src="next.gif" alt="Next Image" /></a>
<p>You want comments? I've got more comments than Elton John has sunglasses!</p>
</div>
</body>
</html>
MstrBob
12-05-2004, 07:06 PM
Some Reading You Should Do:
The <div> and <span> Elements, As Defined in the Official HTML 4.01 Specification (http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.4)
Tables, curtosy of the HTML 4.01 Specification (http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.1)
HTML Semantics and Structure (http://www.brainstormsandraves.com/articles/semantics/structure/)
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.