PDA

View Full Version : 100% Height???


ian27
10-19-2005, 10:42 PM
Hey guys,

I'm trying to create a DW template that has a table set to 100% height. Of course I can do this in the property inspector and in my design view it looks fine, but when I preview it in my browser this parameter does not occur. I want it to be 100% height because I wanted to add the footer of the page right at the bottom even if there is only a small amount of content on a particular page. I have had this working once before using CSS but I've tried the same route and that didn't work either.

Any suggestions or a work through?

Thank you in advance.

Ian

Creative Insanity
10-19-2005, 11:52 PM
Normaly just adding a height of 100% on the table has worked for me.
Wierd that doesn't work in your case.

<table width="800" height="100%">

ranjan
10-21-2005, 03:36 PM
html, body {
height:100%;
}
#your_block_element {
height:100%;
}

By default html and body do not have 100% height in a document with a good doctype. and hence you have to specify it

ian27
10-21-2005, 04:15 PM
html, body {
height:100%;
}
#your_block_element {
height:100%;
}

By default html and body do not have 100% height in a document with a good doctype. and hence you have to specify it
Thanks for the response. Yes, it was the doctype...

I needed to remove the url from the DOCTYPE:

I changed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Now it works! :)

Thank you...

Ian

Creative Insanity
10-21-2005, 06:48 PM
"http://www.w3.org/TR/html4/loose.dtd">
That is annoying. I wish DW would not insert that into every page. It kills so much.

bkendall
10-21-2005, 07:37 PM
In the prefrences you can set the default doc type or you can select none.

Creative Insanity
10-21-2005, 08:33 PM
I have done that bkendall, although in doc type I have NOTHING selected.. create a new page and there is that ANNOYING validator again. Hate it!

Update
Cool.. found the sucker..
If anyone else wants to know how to stop these being created do the following:

Edit -> Preferences
Catagory = New Document.
Now in the top section where it says Default Document Type, set that to none.

Now when you create a new document in DW it will not place those annoying validating tags. Cool.

bkendall
10-21-2005, 09:22 PM
Cool glad it worked :)

ranjan
10-22-2005, 03:31 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


is GOOD doctype

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

BAD doctype

Read more here ('http://www.alistapart.com/stories/doctype/')

Creative Insanity
10-22-2005, 04:31 AM
Maybe so ranjan.. but it kills so much and I really hate it.
Personaly I don't care if W3C likes my code or not, it is what the customer wants not W3C in my books, so I choose to kill it.

ranjan
10-22-2005, 05:36 AM
Look at it this way....

1. You have a problem
2. You ask me to help you
3. You have a quirks mode doctype (bad doctype). This means a browser is free to interpret the code in non standard mode (in other words how THEY want it, whether its IE of FF or any other browser)
4. I say sorry dude, too many variables to work with, I haven't got that kind of time for free work!

And now look at it this way

1. You have a problem
2. You ask me to help you
3. You have a VALID doctype. This means a broswer is expected to behave as per standards. And if it doesn't its a bug and is probably documented by someone on the WORLD WIDE WEB
4. I say here you go buddy, this link is the solution to this documented bug
5. You read, you learn, problem solved!!

The problem posted by OP is typical. html and body tag has no height by default in standards mode. You declare their height as 100% problem solved. In non standard mode however opera and firefox choose to use default height while IE sets height at 100%. This is just a tiny example how browsers might interpret code as they want in non standard mode!!

Please encourage people to always use the correct doctype, its always easier to troubleshoot, unless you are a browser bugs wizard!!

PS: I personally dont care for W3C, I care about what make my job easy thats all!! The "valid html" label from w3c means nothing to me....

Creative Insanity
10-22-2005, 07:08 AM
I know you are right.. but I tend to agree with your last comment.