urroner Posted December 7, 2006 Share Posted December 7, 2006 I am a newbie and couldn't find an help after some searches.I have the following code (it's been stripped for brevity): <header> .TableLayout {WIDTH="100%"; HEIGHT="50";}</header><body> <table CLASS="TableLayout"> do stuff </table></body> When I open it up in a browser, it's just like there in nothing in the header. What am I doing wrong and how can I correct it? Link to comment Share on other sites More sharing options...
mattrd Posted December 7, 2006 Share Posted December 7, 2006 not sure exactly what you want to happen but I did this and "do stuff" shows up fine.</html><head> <style type="text/css"> .TableLayout {WIDTH="100%"; HEIGHT="50";}</style></head><body> <table CLASS="TableLayout"> do stuff </table></body></html> Link to comment Share on other sites More sharing options...
urroner Posted December 7, 2006 Author Share Posted December 7, 2006 When I tried the following, instead of getting the table going all the way across the page, the numbers just clumped up together: <header> <style type="text/css"> .TableLayout {WIDTH="100%"; HEIGHT="50";} </style></header><body> <table CLASS="TableLayout"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> </table></body> Link to comment Share on other sites More sharing options...
jesh Posted December 7, 2006 Share Posted December 7, 2006 Your CSS isn't valid. Try this instead: <head><style type="text/css">.TableLayout { width: 100%; height: 50px; }</style></head><body> <table class="TableLayout"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> </table></body> Notice that it is "head" rather than "header" and the properties and values in the CSS are separated by colons rather than equals signs. Additionally, you shouldn't put any quotes in the CSS. Link to comment Share on other sites More sharing options...
urroner Posted December 8, 2006 Author Share Posted December 8, 2006 Your CSS isn't valid. Try this instead:<head><style type="text/css">.TableLayout { width: 100%; height: 50px; }</style></head><body> <table class="TableLayout"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> </table></body> Notice that it is "head" rather than "header" and the properties and values in the CSS are separated by colons rather than equals signs. Additionally, you shouldn't put any quotes in the CSS. Well, thank you so much. It's the little things that got me.Again, thanks for the little tips. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now