Forums / Cotonti / Support / Modification of news

<<<12

MIHDev
#16 2010-12-08 19:50
Hehe, I must have been in legacy mode as it was 1am, will post the DIV approach for him shortly. :)
[b]Know the question and you will be far more likely to get an answer.[/b]
Kingsley
#17 2010-12-08 20:42
# Koradhil : Please stop using tables for layout, unless it's really tabular data you're working with. In this case it clearly isn't so you shouldn't use tables. Use divs and set float:left on each of them.

Would you care to explain? I heard this before, but actually I find tables working much better (they at least do what I want from them, always have a small war going on with div's..)
Kort
#18 2010-12-08 21:39
This is about semantics. Tables shall be used for tabula data while divs are for block elements. While tables are definitely easy-to-use for a novice-level html-coder, it is incorrect to put there the elements that logically are not supposed to be table contents. However:
  1. I haven't heard of any confirmed negative consequences of that (although it is rumored that they exist)
  2. In some cases (i.e. forums) tables are used "traditionally".
  3. It is much easier (in some cases) to use tables rather than divs / browser-specific css / hacks.
Another good example is lists: navigation is a list, so most html-coders use uls for nav/menus now (rather than tables, divs or paragraphs).
If you're not sure about what you're doing, turn off the styles and check bare html. This will give you a better understanding.
So, if you're up to modern trends / HTML5, you should think about semantics before selecting your solutions. Using tables, however, won't kill ya.
The above example can and should definitely be done using divs.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
This post was edited by Kort (2010-12-08 22:09, 13 years ago)
Kingsley
#19 2010-12-08 22:46
So basically you are saying, use div's as much as possible, and if stonewalled, use tables?

thx for your explanation Kort..
Kort
#20 2010-12-08 22:50
If it is specifications, use table, if it is navigation, use list, if it is paragraph, use paragraph, if it is a layout block, it's a div.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
GHengeveld
#21 2010-12-09 01:04
HTML5 takes this a step further, by adding block-level elements header, footer, section, article and a few others. The main problem with using tables for layout is that you can't move content blocks around on the page by using CSS. Table-based layout fixes element positioning on the page. It works, but it's a terrible mess if you want to change anything. Generally it's bad practice and a sign of an amateur.

Some reading:
http://www.thefutureoftheweb.com/blog/writing-semantic-html
http://dev.opera.com/articles/view/semantic-html-and-search-engine-optimiza/
This post was edited by Koradhil (2010-12-09 01:10, 13 years ago)
MIHDev
#22 2010-12-09 02:09
Interesting reading, I would not agree that it is a sign of an amateur as for that there are usually several hundred things that may or may not show an amateur approach to coding and amateur mistakes can be found in almost any piece of code.

Many sites still use tables successfully for designs as many books on HTML do not focus on DIV's or CSS in detail but I would agree that using DIV's offers more flexibility for customisation through CSS although tables themselves can also function well in that regard as I know many developers have had many nightmares getting DIV elements to do what they want.

Like anything in life, there is a healthy balance to be had between simplicity and flexibility and that is generally based on what the user requires, their level of experience and also how good their CSS skills are.
[b]Know the question and you will be far more likely to get an answer.[/b]
pspfreak
#23 2010-12-09 03:38
If it ain't broken, why fix it? It works for what I want it for, so why fix it?
MIHDev
#24 2010-12-09 03:42
good point :), the discussions above are on 'best practices', the suggestion is to use DIV float elements instead of the tables I posted, both methods work but technically a DIV is more flexible for those choosing the CSS approach. I always say, go with what you feel comfortable with and for me the simplest thing that came to mind at 1am was using a table but their method could be better for those wishing to perform more 'jazz' on their sites. :)
[b]Know the question and you will be far more likely to get an answer.[/b]
pspfreak
#25 2010-12-09 03:43
Well the completed page look like this:
http://ipodtalkcenter.com
MIHDev
#26 2010-12-09 03:44
nice job m8 :), now I just need to get an iPod and I can join the community hehe
[b]Know the question and you will be far more likely to get an answer.[/b]
pspfreak
#27 2010-12-09 03:55
:) MIHDev. I took it from the original sed-light skin.
GHengeveld
#28 2010-12-10 08:25
What about an iPad? It has an iPod app.
Typing this message on one ;)
MIHDev
#29 2010-12-10 08:52
Would love an iPad but for now just got a new mobile so the budget just aint there for one.

Sent from my Windows Phone 7 ;)

@Koradhil: How is the iPad for coding as my phone keyboard is just slightly too small? :(
[b]Know the question and you will be far more likely to get an answer.[/b]
GHengeveld
#30 2010-12-12 01:23
We're going somewhat off topic here, but oh well...
Typing works quite well because the keys are quite big, it works mostly like a regular keyboard. The iPad case/sleeve is a must have, it allows you to type much more easily because it places the iPad under an angle. Autocompletion can be very annoying though, so it's a good idea to switch that off.
Coding on it is not really an option I guess, simply because there's no app for it and also because the onscreen keyboard doesn't show the special characters needed for coding.

Did you know you can make a website/webapplication behave like a native app on iPhone/iPad? There's some special mata tags for it and with JavaScript you can do gestures.

<<<12