This is a discussion on "Tables with 100% width and height" within the Web Page Design section. This forum, and the thread "Tables with 100% width and height are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Tables with 100% width and height
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Tables with 100% width and height
When making HTML I enjoy making tables that are 100% width and height, cos then I can set the single cell (only one column and only one row) to be middle and centred. This way I can put stuff in the dead centre of the page.
Recently I can't seem to get the height to stay at 100%. I just don't get it. I use Dreamweaver, and I've been doing the exact same thing for years, but with the version of DW I'm using now, it just doesn't seem to work (for the height only). Has anyone else had this sort of experience or know a solution? Ta. |
|
|
|
|||
|
Re: Tables with 100% width and height
Well, you should consider using DIV (CSS) instead of the old way which is TABLE
Your browser loads pages with CSS codes much more faster than pages that have table elements inside it! In other words its slow down your HTML rendering process. So... Here is how you do it in CSS: First, paste this CSS style in your <head> section of your HTML page.
Forgot to include the link here! and some of our very own tutorial in the CSS forum sticky here!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Last edited by Monie; Feb 4th, 2008 at 06:05. |
|
||||
|
Re: Tables with 100% width and height
sorry, but there is only one answer, learn css ( as stated above ), start here http://www.cssbasics.com/ , any questions and we are on hand to help
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
|
|
|||
|
Re: Tables with 100% width and height
Can I modify this code to change or at least add a height value (100%)? Because that's more what I'm really after. Making my table the full length (height) of the browser page / window.
Cos I'm trying to not just centre the page horizontally, but also vertically. I guess not... I just tried it. : / I just read thru Chapter 15 (CSS Width and Height) from http://www.cssbasics.com/, and tried the height, min-height, and max-height values, but none worked. Can someone suggest what I might be doing wrong? Last edited by Griff; Feb 5th, 2008 at 04:00. |
|
|||
|
Re: Tables with 100% width and height
Yes you can! Gimme your current HTML and CSS and I'll see what I can do
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Re: Tables with 100% width and height
Could it be that the item I want to be 100% in height needs to be IN something with a value so it knows what 100% actually is?
Would you like my entire HTML and CSS code? They're rather lengthy! Last edited by Griff; Feb 5th, 2008 at 04:41. |
|
|||
|
Re: Tables with 100% width and height
Do you host it somewhere?
Well, if you want to center them horizontally, you just need to change one line of code in the CSS that I gave you earlier
or using the absolute positioning like this:
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Re: Tables with 100% width and height
Yup, you can see the website hosted here:
http://griffdesign.com/websites/lc/content/home.html The CSS file (lightcycle.css) is in the same folder. I tried adding "height: 100%;" to the code, but it didn't seem to make a difference... I want to centre both Horizontally AND Vertically. I've got the horizontal working, but not the vertical. As you will see on that link, the design layout ought to extend to the bottom of the browser window. Last edited by Griff; Feb 5th, 2008 at 04:58. |
|
|||
|
Re: Tables with 100% width and height
Well I must say that you should not use table if you want to learn CSS. You use CSS for your page layout and just use table for tabular data like displaying data from your database stuff
By the way here is the trick:
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Re: Tables with 100% width and height
I just realised I may have been leading you astray... I'm very tired, sorry!
What I'm actually after is making the table reach the bottom of the browser window. Usually, and in the past I've been able to make a table 100% in height and it'd stretch all the way from the top of the window to the bottom. Centering is more of what I do after I've stretched the table out. |
|
|||
|
Re: Tables with 100% width and height
Ohh, LOL. It's ok tho...
I haven't play around with table for quiet sometime and in fact I rarely use table for my layout CSS is the best way for lay outing our page. You might want to check that out! Cheers...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Re: Tables with 100% width and height
Yeah, while searchign the web I noticed a lot of people seem to bag tables and rave about CSS. While I do know how to use CSS, and I have been using it for a few years now, I can't understand how it could be better than tables for layouts, but I guess that's another subject altogether.
Anyways, here's the site now, as it was meant to be. http://griffdesign.com/websites/lc/content/home.html I finally figured it out. It wasn't an HTML or CSS problem! Stupid Dreamweaver had code at the top of the page that I realised many of the websites I've designed in the past never had... Protocols and what not... This stuff: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> I know that stuff is important, but it's screwing with my design... Last edited by Griff; Feb 5th, 2008 at 07:08. |
|
|||
|
Re: Tables with 100% width and height
It's a HTML doctype. You should use a strict doctype or you could choose from here!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS Box of auto width and height? | Bolt | Web Page Design | 2 | Apr 14th, 2008 08:20 |
| floating a div across the whole width and height of a table cell | cosmicbdog | Web Page Design | 3 | Feb 1st, 2008 14:26 |
| Pictures disappearing with correct width and height! | ChrisTheSoul | Web Page Design | 3 | Sep 3rd, 2007 21:56 |
| Borders made from graphics, but fluid width and height | wickedmoon | Web Page Design | 1 | Aug 17th, 2007 11:20 |
| Trouble with form controls. Height, width and all that | magnetica | Web Page Design | 7 | Aug 10th, 2007 12:47 |