Sign in to follow this  

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

This topic is 4690 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
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

This topic is 4690 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.

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

Sign in to follow this