Jump to content

"height" in <table>


domen
 Share

Recommended Posts

hello, I'm new in this forum and in web-proramming :)my problem is this:when I define attribute "height" in table tag, the validator tells me it's incorrect, but I can see no other ways of stretching the table on whole screen. How can I do it using a valid code?Hope my English didn't prevent you from understanding the problem..

Link to comment
Share on other sites

hello, I'm new in this forum and in web-proramming :)my problem is this:when I define attribute "height" in table tag, the validator tells me it's incorrect, but I can see no other ways of stretching the table on whole screen. How can I do it using a valid code?Hope my English didn't prevent you from understanding the problem..
Domen,just got help on this one myself (posted in this forum). Just specify
table {height:650px;}

in your stylesheet. Try to refrain from using markup in your HTML tags. I started myself just recently to use CSS for my layouts. I can already tell you it will save you lots of time if you change your mind and want to change your designs in the future...Kurt

Link to comment
Share on other sites

Kurtthanks for your reply :)Using CSS codes is my next step - currently I'm learning HTML. And even if I used them, would it solve the problem for all resolutions? OK, there wouldn't be any more validating problems, but I want to stretch my table on the whole screen.P.S. won't your code specify height for all tables? what if I want to use this height(650) only in one table?

Link to comment
Share on other sites

I want to stretch my table on the whole screen.
table { width:100%; }

P.S. won't your code specify height for all tables? what if I want to use this height(650) only in one table?
Give your table an id (e.g. <table id="fixed_height">) and in the CSS
table#fixed_height { height:650px; }

You can also specify a style inline

<table style="height:650px; width:100%; ">

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...