RSS Forums RSS
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1276 | Replies: 4 | Solved | Thread Tools  Display Modes
Reply
Join Date: Oct 2006
Location: UK
Posts: 151
Reputation: HLA91 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
HLA91 HLA91 is offline Offline
Junior Poster

Question Talbe Dimensions

  #1  
Jun 15th, 2007
Hi everyone
I have only used tables once before and I am making a web page with a table that fits flush against the sides and top. I have set my nav bar at about 18%, I remember some code you could place in a cell that would make it take up the remaining room does anyone know that code please?

Many thanks
HLA91
Last edited by HLA91 : Jun 15th, 2007 at 4:48 am.
You know your a geek, if you introduce your wife as "mylady@home.wife"
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Posts: 52
Reputation: GiorgosK is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
GiorgosK's Avatar
GiorgosK GiorgosK is offline Offline
Junior Poster in Training

Re: Talbe Dimensions

  #2  
Jun 15th, 2007
I am not sure if its against the ToS to post the website to see what you are talking about,

because by your description I am not sure exactly what you are asking.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,712
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 124
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Talbe Dimensions

  #3  
Jun 19th, 2007
You set up a class with the width of the entire table. Put the class attribute in the table tag, not the td tag.

.width100 {width: 100%;}

....

<table class="width100">
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jul 2007
Posts: 77
Reputation: reen.blom is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
reen.blom's Avatar
reen.blom reen.blom is offline Offline
Junior Poster in Training

Re: Talbe Dimensions

  #4  
Jul 27th, 2007
Originally Posted by MidiMagic View Post
You set up a class with the width of the entire table. Put the class attribute in the table tag, not the td tag.

.width100 {width: 100%;}

....

<table class="width100">


Can I do the same with height of the table?
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 989
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 6
Solved Threads: 52
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: Talbe Dimensions

  #5  
Jul 28th, 2007
Yes. Providing it is within a container with a fixed size.

If the table is a direct child of the body element; apply CSS attribute: height:100% to the table, and also to the body and html elements to meet the above criteria. See the first response to this thread: http://www.daniweb.com/forums/thread26630.html.. Ignore the suggestion that it's invalid XHTML; you don't need a class for the html element anyway; since you only ever have one on a page, just use an element selector, as shown in that example.

Once the table has height/width 100%; any cells without a given height/width respectively will automatically fill to the remaining space.

The table will be height:100%+, because if it gets alot of content, that will have to go somewhere; and generally it will expand down rather than sideways, unless it's a string of unbroken characters.
Plato forgot the nullahedron..
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:49 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC