A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: dreamweaver table

  1. #1
    Piano Rock Astroflux's Avatar
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    252

    dreamweaver table

    what is the easiest way to center a table in dreamweaver. basically to have an image centered in the browser no matter how it is opened.

    thx

  2. #2
    Piano Rock Astroflux's Avatar
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    252
    didnt think it was that tough. these forums dead?

  3. #3
    bidibidibidi clicky2's Avatar
    Join Date
    Mar 2004
    Location
    Indianapolis, Indiana
    Posts
    470
    Well since nobody else seems to be biting ... I'll give it a try.

    I'm honestly not sure you can do much more than center it horizontally. You can just do that in the attributes of the table when it's selected, or if you're in the code, just add a align="center" in the <table> tag.

    To allign it vertically ... well I don't know how that possible using just dreamweaver. Now there's probably some sort of script that can determine the browser window height, then you can use this data to dynamically change your page margins or the x and y position of the table. But this is way beyond my scope of knowledge.

    What I typically do is just use css to apply a margin at the top. I usually base this on a overall browser height of 600 pixels. \

    You could create this in your css document (or embedded css):

    #tablename {
    margin-top: 100px;
    }


    then your initial table tag should look like this:

    <table id="tablename" align="center">

    It at least moves your elements closer to the middle of the screen, and since most still view at 800 x 600 that's why I usually base mine on that dimension.

    Hope that makes sense or at least helps you out a little bit. I'm sure they're are better ways to accomplish this though.

  4. #4
    Piano Rock Astroflux's Avatar
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    252
    thx for the reply. i just need to sit down and learn some css....

  5. #5
    bidibidibidi clicky2's Avatar
    Join Date
    Mar 2004
    Location
    Indianapolis, Indiana
    Posts
    470
    I highly recommend it.

    I rarely use table cells or little spacer images to adjust my layout anymore. You can do it all in css and with <div> tags. Great for dynamic content as well.

  6. #6
    Junior Member
    Join Date
    Jul 2004
    Location
    Montreal
    Posts
    6
    It's not the most accurate, but if you want something very quick & easy, here's what you can do to center your image (both vertical & horizontal)

    make a 1 cell table(1x1), give it 100% width & 100% height. TD tags should be : align="center" valign="middle" ...Now put your image in there. You're done.

  7. #7
    ? tonytryout's Avatar
    Join Date
    Oct 2001
    Location
    Somewhere out there
    Posts
    864
    Originally posted by [tuka]
    It's not the most accurate, but if you want something very quick & easy, here's what you can do to center your image (both vertical & horizontal)

    make a 1 cell table(1x1), give it 100% width & 100% height. TD tags should be : align="center" valign="middle" ...Now put your image in there. You're done.
    this is what I usually do but not exactly accessibility-friendly so it is worth checking out XML/CSS as it would mean separating content from structure (always a good thing!)

  8. #8
    Junior Member
    Join Date
    Jul 2004
    Location
    Montreal
    Posts
    6
    Originally posted by tonytryout
    this is what I usually do but not exactly accessibility-friendly so it is worth checking out XML/CSS as it would mean separating content from structure (always a good thing!)
    True, but for someone who doesnt know much about it or about tables, that's the easiest way to do it... while searching for a BETTER way

  9. #9
    bidibidibidi clicky2's Avatar
    Join Date
    Mar 2004
    Location
    Indianapolis, Indiana
    Posts
    470
    I agree, this is easier but the height attribute isn't supported in all browsers. So then the artwork will be flush at the top at times.

    If you don't want to mess with css, just create a table within the other one (the one with 100% height and width as [tuka] noted) that's 3 rows by 1 column. Set the height of the top and bottom rows the same (say 50 or 100 pixels ... depends on the height of your graphic) and plop your image in the middle cell. This way in browsers that do support the height attribute the image will be centered on the page, and in those that don't it will at least have a set margin at the top.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center