PDA

View Full Version : Dreamweaver Template - Table Row vs Div



Jim Nayzium
Nov 12th, 2006, 04:07 PM
I have a ton of work already finished for my latest site.

I am a video producer, and have been asked to code up a website. Please forgive me if I sound like an amateur. The reason I sound that way, is because I am one.

I respect the professionalism of this forum and feel priveleged to be able to post here.

Here is my question ---

I have currently set-up my site to use a custom template in Dreamweaver 8.

The entire site will be driven by php and MySQL and will largely be dynamic content loaded from the databases.

The current template lists all the information necessary for the database to work correctly on each page, and has editable parts for the metadata and title and then leaves an open <tr><td> and then has

editable content region...

then in the footer it closes the table tags and html tags after displaying code for the footer itself.


I have been more than convinced by just a few posts here and other reading that CSS is far better than tables.

However, should I really go back to the drawing board with the site wide template, or just now use the CSS way for the 'editable regions.'

My main glitch is that the table expands when the content gets wider than will fit, and this drives me crazy. This is why I started doing more research, because I knew I was using ten year old coding practices to begin with.

I found your forum, immediately got converted, then had buyer's remorse with my template.

My gut feeling is I could recode the template also and it would then just be better, but the whole idea of scratching all of this work and starting over scares me.

Because I also read places comments like --- "there are some things tables do better...." but i have not really grasped the rules yet on when a table is better.

Here is the link to my work in progress site....
http://mikebake.p194.pandawebsites.com/Staging-StudioAuditions/index.php

and my work in progress CSS version (very simple version)
http://mikebake.p194.pandawebsites.com/Staging-StudioAuditions/3_Column_Fixed.php


I guess my fear is my newness to all things CSS and its limitations on certain browsers and things. My customer thinks that every one views the web the way he does....Although he is short-sighted on this fact, he is MY customer...so I have to cater to the IE version he has. He is not willing to be told that other browsers are better.

So my biggest fear is I spend the necessary time and energy to make my site meet standards and to do it the best way, and in turn create something the client won't like to begin with.

From the tutorials I read, it would seem that the IE hacks are pretty straight forward for the things I want to accomplish, but I use a mac and cannot test on IE at all. Tiger version of IE keeps crashing on me and my only PC is at work in a different office. So I check things every few hours.

But recently his IE with the same version of OS and IE displays differently than mine...which is totally maddening!!!!

Any advice would be greatly appreciated.

I guess my overall question is ----

Should I scrap the table deal in the template and just leave div tags unclosed in the overall wrapper div inside my template, and close them at the end of the template like the td tags are doing now....?

Thanks a ton.

ttttt
Nov 12th, 2006, 04:30 PM
Well, css is definately better than tables.
I don't see what you mean about the unclosed divs because it's quite easy to make a webpage that looks like it's fluid and behaves like it's fluid.

Jim Nayzium
Nov 12th, 2006, 04:35 PM
Well, I don't really want fluid, I want fixed.


but I really only want fixed horizontally, if that makes sense.

I want the templatet to house a 900 wide site....and the template to include the top navigation bars...the top banner ad...and the top submenu...

then the editable content...\\\

then in the template---iclude the footer, either with php or manually in the template...doesn't matter really.



And this editable content CANNOT exceed the 900 either no matter what...

Currently with tables inside the content, sometimes it pushes out over the 900 cuz the tables are auto-expanding, which pushes the whole site wider...

This is what i want to avoid.

ttttt
Nov 12th, 2006, 04:36 PM
well you can just use css max-width:900px in a css style sheet.

Jim Nayzium
Nov 12th, 2006, 04:55 PM
would the max width 900 go into the

topmost wrap?

meaning the very first wrapper that has its closing div tag as the last thing on the page before the body/html tags?

thanks.

Also, on a side note, is there a quick way with commenting or something like that to keep track of the div tags and which /div closes which opening?

right now I have



<div id="wrap">
<div id="header">Header</div>
<div id="inner-wrap">
<div id="left">Left</div>
<div id="main">
<div id="right">Right</div>
<div id="content">Main Content</div>
</div>
</div>
<div id="footer">Footer</div>
</div>
</div>

would love for it to say


<div id="wrap">
<div id="header">Header</div>
<div id="inner-wrap">
<div id="left">Left</div>
<div id="main">
<div id="right">Right</div>
<div id="content">Main Content</div>
</div>
</div>

<div id="footer">Footer</div id="footer">
</div id="header">
</div idi="wrap">

ttttt
Nov 12th, 2006, 04:58 PM
As for the commenting:

<!-- Comment here -->
But the top wrapper, I don't understand what you mean.

Jim Nayzium
Nov 12th, 2006, 05:04 PM
I know what commenting is, sorry for unclear question...I guess I meant is there something in the way I type it into DW that will auto explain it to me visually.

I do so much pasting from page to page, and from tutorials I do, that the tabbing always gets screwed up.

In flash, my actionscripting gets the same way, and flash has a button that formats all the tabs for you.

Is there something comparable in DW?

As for the max width 900 question, which part of my css would this apply to?

If I never want any part of the site wider than 900?

What I was saying was would it be the first div that all other divs are included within?

ttttt
Nov 12th, 2006, 05:14 PM
Well, a good practice with css is to include everything withing a container div.
You would then just say that this container div has a max-width of 90% (or 900px if you prefer), and everything else will automatically be 100%, unless you say otherwise, so all of the nested elements will be 90% (900px) of the whole page. But remember, you will need to use padding-left:5% (or 5px) to centre it.
Hope that isn't too rambly!
As for the tabbing, just go to commands -> apply source formatting.

Jim Nayzium
Nov 12th, 2006, 05:24 PM
Because this all related I am not starting a new thread...but if I should just let me know...

If I say in CSS that my header height is undeclared, then it will, by default just include everything vertically correct?

If that is the case, how can I then accurately have the content display correctly just under the header, no matter how tall the header is?

Thanks.

ttttt
Nov 12th, 2006, 05:28 PM
Well, the header will just fit everything in if the height is undeclared.
The stuff under the header, if you put everything inside a container div, will just move down to accomodate the change in height.

SWG
Nov 12th, 2006, 05:42 PM
I'll recode the whole thing for like $5.00. Finding errors in that thing will take you forever. Especially if you don't know a lot of HTML.

I might just recode it for free. I'll post it when I'm done.

Jim Nayzium
Nov 12th, 2006, 05:45 PM
SWG you may become my all-time favorite forum-user. Haha.

I do have expertise to offer in return, just not in html / css.

I have actionscript 2.0 pretty well down, and all things apple, like Final Cut Pro, Motion, DVD Studio Pro etc...

ttttt
Nov 12th, 2006, 05:48 PM
You don't really need to know anything but very basic html. There are thousands of walkthrus on the net. Search for something along the lines of "css html website clear:both tutorial".

SWG
Nov 12th, 2006, 06:08 PM
Man, this coding is all over the place. Who ever coded this for Dreamweaver did it horribly.

SWG
Nov 12th, 2006, 06:14 PM
would the max width 900 go into the

topmost wrap?

meaning the very first wrapper that has its closing div tag as the last thing on the page before the body/html tags?

thanks.

Also, on a side note, is there a quick way with commenting or something like that to keep track of the div tags and which /div closes which opening?

right now I have



<div id="wrap">
<div id="header">Header</div>
<div id="inner-wrap">
<div id="left">Left</div>
<div id="main">
<div id="right">Right</div>
<div id="content">Main Content</div>
</div>
</div>
<div id="footer">Footer</div>
</div>
</div>

would love for it to say


<div id="wrap">
<div id="header">Header</div>
<div id="inner-wrap">
<div id="left">Left</div>
<div id="main">
<div id="right">Right</div>
<div id="content">Main Content</div>
</div>
</div>

<div id="footer">Footer</div id="footer">
</div id="header">
</div idi="wrap">



Why would you end a DIV tag the way you did? I thought HTML was supposed to be a basic "<tag attribute="value"></tag>" creating an element...

I may not have time to finish coding this... I will finish it later though. When I am finished, I'll post it up on here. Sorry about me not being able to finish it...

Jim Nayzium
Nov 12th, 2006, 06:24 PM
I know not to end tags this way...I was just saying it would be a lot easier if it was like this..once there are alot of embedded things.

Jim Nayzium
Nov 12th, 2006, 07:18 PM
http://mikebake.p194.pandawebsites.com/Staging-StudioAuditions/3_Column_Fixed.php

This page uses this css...

http://mikebake.p194.pandawebsites.com/Staging-StudioAuditions/3_Column_Fixed.css


I want to get the yellow background with the red-line down the middle to extend vertically down with the left and right deal...

Not sure what I am doing incorrectly?

Thanks.

SWG
Nov 13th, 2006, 02:03 AM
You can't code a content management system or anything can you? Even if I recode the design and stuff you won't be able to have the content management system along with it...

Should I continue coding the design? Or do you want me to stop now... Because, I can't code it including the content management system.

Jim Nayzium
Nov 13th, 2006, 02:07 AM
Well any work you would be willing to do that I cannot do and do it for free, I am never going to tell you to stop...hahaha...

no seriously, I think I did figure out some things.

I just need to actually take the time to learn the fundamentals of css. I just don't have the time.

I just jumped off a cliff and am yelling back to you guys on the cliff..."HEY....TEACH ME TO FLY!!!"

hahahaa

I know this sounds really bizzare, but I can code the php/mySQL stuff much easier than the html parts. So if by CMS you are implying my own content stuff...I could sub-in the necessary chuncks of code where the hard code is now...

ie - if you leavfe the image links there, then I would know what parts of my code shoud go there....etc...

But if you just want to maybe help me along now and inspect this page that might suffice...

BTW ---THANKS!!!

http://mikebake.p194.pandawebsites.com/Staging-StudioAuditions/3_Column_Fixed2.php