HighDots Forums  

Image or text not centering in Table

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Image or text not centering in Table in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
johnacb
 
Posts: n/a

Default Image or text not centering in Table - 07-04-2004 , 08:31 PM






Hi All

I am using DMX2004 and have created a table 100% high and 100% wide with an
image that is supposeed to be in the center and middle. When I view it it
displays at the top. If i copy the tcode to DMX it works fine

Any help appreciated , code is below

www.mtwoodgee.com.au

<table width="100%" height="100%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td align="center" valign="middle"><img
src="images/its%20coming%20page.jpg" width="560" height="418"></td>
</tr>
</table>

Thanks


Reply With Quote
  #2  
Old   
dreamweeper
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-04-2004 , 09:21 PM






I do not have an answer for your problem, but I had a similar situation when I
tried to fill the full height of the screen with a tiled background image. I
feel it is a flaw in DW--it does not like 100% heights in tables. It may have
to do with the addition of more CSS in DW MX2004. I called tech support, and
they had no solution. My workaround was to do the raw HTML code in Notepad,
and it worked! Luckily it was a small site. I never did get it to work in DW.
No help to you, but I feel your pain.


Reply With Quote
  #3  
Old   
Koenig
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-04-2004 , 09:50 PM



Quote:
. I
feel it is a flaw in DW--it does not like 100% heights in tables.
Table height is not strictly correct code. Dreamweaver will let you do it -
just don't expect all browsers to know it is there.





Reply With Quote
  #4  
Old   
:. Nadia .:
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-04-2004 , 09:51 PM



Ok, here's what's happening. First off have a look at your pages - at the
doc type.

DWMX4 doesn't insert a full doc type, whereas DWMX2004 does. DWMX2004 is
doing it correctly, MX4 is not.

DWMX inserts a broken doctype on the page. Therefore, all these pages are
rendered in quirks mode.

Table height is not valid html, and won't work in most modern browsers.
Without the doc type (quirks mode) some browsers will try and render 100%
height, but it is not correct.

If you want valid code, you could wrap everything in a centered div -

css:
#pagewrapper
{ width:760px; margin:0 auto; }
....
on your html
<div id="pagewrapper">the page's content goes here</div>

Have a look here for an example
http://www.roast-horse.com/tutorials/_tutorials/css_centered_content/index.html

--
Nadia
---------------
:Free Templates !! Dropdown Menu Designs:
http://www.DreamweaverResources.com
:Templates: Free Nav Bar Sets:
:Tutorials : Ecommerce : SEO Articles :
-----------------


"johnacb" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi All

I am using DMX2004 and have created a table 100% high and 100% wide with
an
image that is supposeed to be in the center and middle. When I view it it
displays at the top. If i copy the tcode to DMX it works fine

Any help appreciated , code is below

www.mtwoodgee.com.au

table width="100%" height="100%" border="0" align="center"
cellpadding="0"
cellspacing="0"
tr
td align="center" valign="middle"><img
src="images/its%20coming%20page.jpg" width="560" height="418"></td
/tr
/table

Thanks




Reply With Quote
  #5  
Old   
:. Nadia .:
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-04-2004 , 09:54 PM



"dreamweeper" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I do not have an answer for your problem, but I had a similar situation
when I
tried to fill the full height of the screen with a tiled background image.
I
feel it is a flaw in DW--it does not like 100% heights in tables. It may
have
to do with the addition of more CSS in DW MX2004. I called tech support,
and
they had no solution. My workaround was to do the raw HTML code in
Notepad,
and it worked! Luckily it was a small site. I never did get it to work in
DW.
No help to you, but I feel your pain.

Not a bug in DW at all. Have a look at my explanation to the OP.
Table height is not valid html.

--
Nadia
---------------
:Free Templates !! Dropdown Menu Designs:
http://www.DreamweaverResources.com
:Templates: Free Nav Bar Sets:
:Tutorials : Ecommerce : SEO Articles :
-----------------






Reply With Quote
  #6  
Old   
johnacb
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-05-2004 , 12:14 AM



Thanks Nadia

That works better. I can get the image in the middle horizontally, But how do i get the image in the center of the page verticaly.

Thanks again

Reply With Quote
  #7  
Old   
:. Nadia .:
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-05-2004 , 12:46 AM



You may want to have a look at the pvii Layout Designer to accomplish this.
http://www.projectseven.com/extensions/info/layoutDesigner2/index.htm

and you're welcome

--
Nadia
---------------
:Free Templates !! Dropdown Menu Designs:
http://www.DreamweaverResources.com
:Templates: Free Nav Bar Sets:
:Tutorials : Ecommerce : SEO Articles :
-----------------

"johnacb" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thanks Nadia

That works better. I can get the image in the middle horizontally, But how
do i get the image in the center of the page verticaly.

Thanks again



Reply With Quote
  #8  
Old   
johnacb
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-05-2004 , 01:49 AM



Thanks for your help Nadia, have a good one.

I will check out the links....

John

Reply With Quote
  #9  
Old   
:. Nadia .:
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-05-2004 , 02:03 AM




"johnacb" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thanks for your help Nadia, have a good one.

I will check out the links....

No problems, jfyi - I use layout designer here - to center align a flash
movie (site under construction right now).
http://www.perrelink.com.au/manu/wgc/

--
Nadia
---------------
:Free Templates !! Dropdown Menu Designs:
http://www.DreamweaverResources.com
:Templates: Free Nav Bar Sets:
:Tutorials : Ecommerce : SEO Articles :
-----------------




Reply With Quote
  #10  
Old   
dreamweeper
 
Posts: n/a

Default Re: Image or text not centering in Table - 07-05-2004 , 10:41 AM



Nadia, thank you for your comments. While I agree that "height =100%" is not
good html code, sometimes you need it. What would you suggest in this case? You
have a two column one row table. You want a background image to be tiled from
top to bottom of screen in left column. In DW2004MX you will get just tiling to
the bottom of the content in column 2 (with height set to 100%). In DW2004 you
get full tiling. In writing raw HTML code outside of DW you get full tiling. I
still feel it's a flaw in DWMX2004. Well maybe a flaw is too strong a
language--maybe MX2004 is too strict on proper coding. This is all evaluated on
using IE. And I don't think using third party software is the answer. Centering
an image vertically and horizontally on the screen should be a simple thing to
do. This is not my web site, but check out the source code on
http://www.chronologicalorder.com where an image is centered v and h. Thank
you for your help.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.