MyBB Community Forums

Full Version: The use of tables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
1.8 will be on GitHub too remember Wink There's no need to wait till 2.0.
I just changed a test theme of so that the main index page is tableless for the forum_bit_cat1 and forum_bit_depth2 but it was a PITA. so many little things to have to code that a table setup just handles normally.

max widths, min heights, widths, displays, floats, margins, padding, etc all for the various things an HTML table on its own. once i get the base layout down I will move the inline styling to css, buts its cluttered and so many different classes will be needed.
I was thinking, if the tables was replaced....

Is the titles for each column really needed? I mean, it is 2012. I'm sure if you looked at what's there, you can figure it out:

Thread / Author	Replies	Views	Rating	Last Post

Is what I'm talking about. That could be replaced with a header element.

So instead of

Thread / Author	Replies	Views	Rating	Last Post [asc]

It'll simply be:

<h2> Catagory Name (or Threads) </h3>
<ol class="threads-list">
   <li>
     <ul class="thread">
      <li class="thread-title">
         <h3> A new thread! </h3>
         <span class="thread-pages"> (Pages: 1..2..3...20) </span>
         <span class="thread-author"> Jon Doe </span> 
     </li>
     <li class="replies"">260</li>
     <li class="views"> 2,500 </li>
     <li class="rating"> X X X X X </li>
     <li class="last-post"> Blah </li>
   </ul>
  </li>
</ol>

Which would remove the need for tables on the front-page. The list could easily be styled and floated.

But getting a fluid layout with CSS max-width and such could be a little tricky at first.

Quote:max widths, min heights, widths, displays, floats, margins, padding, etc all for the various things an HTML table on its own. once i get the base layout down I will move the inline styling to css, buts its cluttered and so many different classes will be needed.

I could see a problem with min/max-widths, but it could easily be capable of getting a fluid layout after playing around for a few minutes with CSS. But other then that, padding, floats, margins could easily be done.

ol.threads-list li ul li { padding: 10px 15px; margin: 10px; }

All it takes to apply padding across. and one more note.... having to much classes isn't a bad thing as long they'e semantic and not like class="redtext"

But anyways, thought this would be a good alternative, if you guys do decide to replace tables. Ignore my bad use of spans and class-names though.
i had thought about using lists, but right now my test theme is all divs.

since i use divs, the min-width is required to keep from pushing long elements off the page and max-width is needed for some sub-divs due to long descriptions to make them wrap

and I did not use fields headers either.
Pages: 1 2