Click to See Complete Forum and Search --> : Dreamweaver Tables
Syndicate
06-10-2004, 05:10 AM
Just tossing this out there for general feedback.
I've designed a few sites in Dreamweaver, and I presonally find it annoying to try and piece a site together using tables in Dreamweaver. If I insert an image, it throws off all the other cells that I have already set-up. I'm trying to keep each image in it's own cell, but this is difficult when the images are shifting all over the place.
Any tips that will make this easier??
http://www.syndicategraphics.com/sig.jpg
casedsgn
06-10-2004, 05:40 AM
Learn the meat and potatoes of HTML, without it you'll be lost.
Building tons of nested tables and cells in dreamweaver with rowspan and colspan tags everywhere is going to make for some pretty nasty code and very unpredictable sites.
Keep it as simple as you can.
Ryan8720
06-10-2004, 06:54 AM
Learn CSS and banish tables forever. Muuuuwwwhhhhhaaaa!
http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)
C:\DOS
C:\DOS\RUN
RUN DOS RUN
Welcome to the world of web development. Thats what all of us went through ask Defjoe. Tables are only good for presenting tabular data (Graphs etc.).
CSS is what you need. Just think QuarkXpress type of flexiblity with layering (Z-index) capablities. It might be a little bit of a learning curve but you'll be one happy camper when things actually work.
Benjamin
06-10-2004, 05:17 PM
Well personally I love tables. At least 15-deep nested tables in every site, that's what I say.
Seriously though, I still find that using one table somewhere in the layout can be OK to keep things stable. This is because 'float' styles seem to go all over the place.
Learning HTML properly and hand coding is definitely the way to go.
http://www.jackfruitdesign.com/
Om Namah Shivaya
Benjamin,
I banish you to www.w3shools.com till you understand CSS....:) * places hand on head * Learn forthwith...
Just kidding. If your floats are flying everywhere then your missing something. Perhaps the outer block tag is not positioned right?
- Bill
Ryan8720
06-10-2004, 06:23 PM
I hardly ever even need to use floats.
http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)
C:\DOS
C:\DOS\RUN
RUN DOS RUN
3howards
06-10-2004, 07:16 PM
they're those flower-covered cars you see in the rose parada .... ;)
Ryan8720
06-10-2004, 07:17 PM
Float is a property in CSS. You can use it to take an element out of the normal flow of the document. For example, you can float an image in a big block of text. The text will move around the floated image.
To see for yourself, go here (http://www.w3schools.com/css/css_classification.asp), then click Float. One you are in the tryit editor, put the following in the left side.
said...
<html>
<head>
<style type='text/css'>
img
{
float: left
}
</style>
</head>
[b]
<p>
<img src='/images/bookasp20.gif'
width='120' height='151' />With the
value of 'left' the image will
float to the left in the
paragraph. If there is a bunch of text, the text will move around the image. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In lectus ipsum, gravida eget, tempor id, varius et, wisi. Aliquam euismod. Proin turpis turpis, venenatis non, lobortis non, interdum sed, enim. Nam faucibus blandit felis. Aenean eu augue eget eros tristique feugiat. Vivamus ultricies. Nulla ut tortor. Sed vitae nisl. Fusce rhoncus, dui non convallis ullamcorper, wisi orci semper urna, nec rutrum metus mauris vel wisi. Etiam pulvinar consectetuer nibh. In ullamcorper. Donec malesuada. Fusce posuere consequat odio. Vivamus hendrerit suscipit erat. Quisque eget nunc. Proin tincidunt vulputate sapien.
</p>
</body>
</html>
Notice how the text moves around the floated image. Then take out the styling and see what happens.
http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)
C:\DOS
C:\DOS\RUN
RUN DOS RUN
3howards
06-10-2004, 07:28 PM
how difficuly would it be to make the text and images dynamic?
3howards said...
they're those flower-covered cars you see in the rose parada .... ;)
LMAO!
Oh so it's like a runaround. Gotcha!
Ryan8720
06-10-2004, 08:05 PM
3howards said...
how difficuly would it be to make the text and images dynamic?
What do you mean? Have the image and text change when you refrest/hit a button?
http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)
C:\DOS
C:\DOS\RUN
RUN DOS RUN
3Howard,
Not very difficult at all.
<img src=<?php echo $src; ?> >
How hard is that? Of course there is more to it but I think you get the point.
- Bill
YellowDart
06-10-2004, 08:37 PM
/me gets his ass in gear and starts reading up on CSS dev. =P
I code exclusively in HTML 4.0 atm... but that's all we use @ work... I've never asked my boss if we can use CSS and banish tables... Although I have heard rumblings in the past year or so that we may be required to learn XML and use that for our webdev work... *shrug*
I'm learning PHP and it's kind of confusing. I understand what you wrote but some of it is completely cryptic. {[Post_Me] ./whatever/}
YellowDart,
You might be suprised to hear this but you already know XML, you just don't know some of the rules. Way back in the day there was an Uber markup language called SGML which HTML is derived from. XML (extensible markup language ) is just a subset of this SGML (Standard Generalized Markup Language) too. Just a few more rules and some more tags are required to make it work right. The two big rules are:
1. Every XHTML tag must end. Even tags which have no end tag normally ( ie <img ... > becomes <img ... /> )
2. All attributes have to be quoted ( ie <img src=somefile.jpg> becomes <img src='somefile.jpg' /> )
( Oh yea img must have an alt ... but you should be doing that anyway )
- Bill
3howards
06-10-2004, 08:50 PM
will it work the same for text? i'm looking at developing our portfolio page in php to cut down on maintenance ... and to fit into our new site that validates. only 2 things left to do before we launch it, a quote form and the portfolio page.
PHP is an add on language. What that means is the webserver (what it is IIS, Apache, Websphere, etc. ) passed the page to a preprocessor ( if its named .php or whatever ) and then the output of that is sent to the browser ( down the pipe so to speak.)
To start a php section within a page you use
<?php
to end the section you use
?>
everything between the two <?php ?> is php code. If you look it almost looks like a normal HTML tag...thats not an accident.
the echo command simply sends the contents of what follows to the browser.
<?php -- open the php code block
echo $str; -- print out the variable str ( the $ lets the preprocessor know this is a variable )
?> -- end the php block
Every statement in PHP ends with a ; (semicolon) just as in C/C++, Java, Javascript and ASP Javascript.
Hope that helps.
- Bill
3howards said...
will it work the same for text? i'm looking at developing our portfolio page in php to cut down on maintenance ... and to fit into our new site that validates. only 2 things left to do before we launch it, a quote form and the portfolio page.Yes. In fact the whole page could be replace with
<?
echo $page;
?>
if you really wanted to. But the same goes for any section of the page.
<img src=<?php $src; ?> >
<p><?php $text; ?>
The problem is how to put data into those variables??
- Bill
To feed images to a dynamic page you need a back end database. Thats the problem you have to learn PHP and MySQL. That's what I'm doing.
You can make all the links static and use php to print them to your browser for now and that way when you finish learning MySQL you just have to update the code which might be minimal. I don't know for shore though cause I'm still learning.
Ryan8720
06-10-2004, 09:21 PM
benjo... said...
To feed images to a dynamic page you need a back end database. Thats the problem you have to learn PHP and MySQL. That's what I'm doing.
You can make all the links static and use php to print them to your browser for now and that way when you finish learning MySQL you just have to update the code which might be minimal. I don't know for shore though cause I'm still learning.
Not necessarily. You could keep the images in an array.
http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)
C:\DOS
C:\DOS\RUN
RUN DOS RUN
How is that? Wouldn't that make them all load cause they are in the source.
This is probably a stupid question, right?
Benjo,
You could keep them in a text document for that matter. A database is not necessary and can sometimes just add to the confusion.
- Bill
So I can just keep the absolute links in a txt file. How do you address the correct on. You must be using some kind of varible that links to a div id tag right?
How is this done you guys always catch my attention with this stuff.
Benjo,
You could have a file like so:
http://somwhere/image1.jpg
http://somwhere/image2.jpg
http://somwhere/image3.jpg
http://somwhere/image4.jpg
And each time the page updated it would place one of those lines in the src of the <img> tag.
How to you choose which one? Well you could read in the entire file into an array, generate a random number from 0 to # of elemnts in the array, and them send that one to the page.
Or you could just step through them one by one. The only thing you'd have to do is remember which one was last, but you could do that with another text document.
- Bill
Now that is cool!
I'm learning how to 'return values from a function' Chapter three of 'PHP an MySQL from Peachpit press. It's a bit of a learning curve to me. Plus it's not as easy as CSS was to learn. Even though I still don't know CSS that well but at least I can use it now.
You've already used functions but they weren't called that and don't look like PHP functions:
3+4 = 7
+ is a function it returns the sum of its arguments ( 3 and 4 )
You could write this in PHP like so:
function sum( a, b ){
return a+b;
}
Not much to it eh?
- Bill