Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

[web] Should I use css for these kind of things?

This topic is 5000 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was wondering if I should use css for objects that will never get modified, ie its perfect, and its only tables ? Because I'm using a table for each page, so it will print properly etc <div style="page-break-after:auto"> <table width="100%" height="100%"> <tr height="0%"><td><table width="100%" height="100%"><tr> <td class="headertitle" align="left">header</td> <td class="headerpage" align="right">Page 1 of 4</td> </tr></table></td></tr> <tr height="100%" valign="top"><td>body</td></tr> <tr><td> foot </td></tr> </table>
See I've got the div tag style, like im never going to change that, because it does exactly what i want, and the table layout there does exactly what i want, nothing less, nothing more. Do you think I should bother putting that data into css classes, because these lines of html are going to be used over a hundred times, whats the general use of css on these kind of things? thanks

Share this post


Link to post
Share on other sites
Advertisement
Tables are not meant for layout, they're meant for columnar representation of data. Having said that, some layouts are tricky or nigh on impossible to achieve without using them. Your example here is trivial - although not necessarily obvious - to do in CSS. You just have to decide for yourself I suppose.

Share this post


Link to post
Share on other sites
I don't think its possible to do this using div tags instead of tables.

As I can put the table to 100% height, but when i do that with div tags, it goes out of sight.

What I'm doing is i have a header and a footer, which are to be printed on each page, which are to be positioned at all times at the top and at the bottom.

Any idea on how to do this doing the css way?

thx

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!