PDA

View Full Version : HTML table space problem



rmcellig
May 27th, 2011, 08:10 PM
I am hoping that there is a HTML table expert in this forum. For some reason, there is a lot of space before my actual table and I don't know what is causing this and how to fix it. I've attached a copy of the HTML file.

lucazade
May 27th, 2011, 08:19 PM
I am hoping that there is a HTML table expert in this forum. For some reason, there is a lot of space before my actual table and I don't know what is causing this and how to fix it. I've attached a copy of the HTML file.

remove all the <br/> tags from your page.. are not necessary and take all the space at the top!

rmcellig
May 27th, 2011, 08:27 PM
Thank you so much lucazade for your super fast response!!!! I really appreciate this!!!! Do you think that using tables is the best way for me to display this data or is there a better way that I am not aware of?

lucazade
May 27th, 2011, 08:38 PM
I believe for simple purposes are html tables are enough.. you could add a bit of style and color to them using CSS

take a look a this page:
http://www.w3schools.com/css/css_table.asp

here you can try and modify the example live:
http://www.w3schools.com/css/tryit.asp?filename=trycss_table_fancy

rmcellig
May 27th, 2011, 08:43 PM
Thanks again! I was thinking of doing some CSS styling after I make sure that all of my data is in my table.

lucazade
May 27th, 2011, 09:03 PM
You are welcome!

If you are looking for something better, and you want to spend a little time implementing it, I could suggest to use ExtJS framework
http://www.sencha.com/products/extjs/examples/

take a look at this cool table ;)
http://dev.sencha.com/deploy/ext-4.0.1/examples/grid/array-grid.html

rmcellig
May 27th, 2011, 09:04 PM
I will definitely take a look. By the way, where exactly does the CSS code go in my HTML document. Thanks!

lucazade
May 27th, 2011, 09:08 PM
I will definitely take a look. By the way, where exactly does the CSS code go in my HTML document. Thanks!

at the top of your html document between the <style>...</style> tags

rmcellig
May 27th, 2011, 09:20 PM
OK. Thanks.

Zero2Nine
May 27th, 2011, 09:22 PM
Or you might keep it in an external file if you want to apply the style to more than one document. http://www.w3schools.com/Css/css_howto.asp

rmcellig
May 27th, 2011, 09:25 PM
What distro are you using? I'm trying out Pinguy. I am looking for a distro that is easy to install and has everything included that Ubuntu lacks like some of the files you have to add after installing Ubuntu. Any suggestions for other user friendly distros that work well and require minimal updating (if possible :))

Bandit
May 28th, 2011, 12:16 AM
Thank you so much lucazade for your super fast response!!!! I really appreciate this!!!! Do you think that using tables is the best way for me to display this data or is there a better way that I am not aware of?

Modern web designers are starting to steer away from the use of tables as much as possible, although they still have their place. Now webdesigners are using Divs <div> or organize data.

Take a look at W3C Schools website for more information.

rmcellig
May 28th, 2011, 01:15 AM
Thanks Bandit! Would you have an example or link to an example? I couldn't find one on the W3C Schools website.

jhonan
May 28th, 2011, 01:17 AM
Thanks Bandit! Would you have an example or link to an example? I couldn't find one on the W3C Schools website.

http://mindrulers.blogspot.com/2008/03/create-table-using-css.html

Bandit
May 28th, 2011, 06:59 AM
Thanks Bandit! Would you have an example or link to an example? I couldn't find one on the W3C Schools website.

Sure :-) http://www.w3schools.com/tags/tag_DIV.asp

Zero2Nine
May 28th, 2011, 07:38 AM
Modern web designers are starting to steer away from the use of tables as much as possible, although they still have their place. Now webdesigners are using Divs <div> or organize data.

Take a look at W3C Schools website for more information.

Tables for layout are generally regarded as bad practice. But if you want to display tabular data... that's where the <table> element was designed for. Or maybe my html knowledge is outdated ;)