Hi there, I’m totaly brand new at div & css design and style, so please say to me why the first is better from a further
This dates back to the original browsers plus the beginning of CODE…
< table> was originally designed to display " tabular" facts. Such as a list of
things from a database, possibly your calendar (with solar cells horizontal and vertical),
and displays and information who have a " grid" or perhaps " list" like layout.
As web sites became more intricate and stylish, folks started using tables
to position areas of content. The layout was no longer " tabular", women and men use
associated with tables allowed folks to section-off locations and images.
CSS (cascade model sheets) came down and offered a wider variety of layout
methods. The < div> has been a " division" or section of content and could be placed
anywhere you want to. It can end up being selectively styled (fonts, backdrop, colors, padding, etc).
CSS may also be stored in any. css file, and referenced on just about every page. That means
every page on the website can make use of the same CSS document. If you adjust one color
for the reason that CSS file, that change is created across your complete pages.
Furniture still work very good for websites, especially the location where the content never improvements.
A designer tweaks everything perfectly plus the web pages stay similar.
But things vary now… websites usually are " dynamic". This content is always
changing from day to day. This is an issue with tables, because they are good
to get static pages, but is not for pages having varying content programs and graphic improvements.
CSS can simplify the complete idea of changing content for a page, as the idea adjusts for the
adjust in content.
So tables should be used for " tabular" facts, but not to get design layouts regarding pages.
If you know HTML and CSS, here’s a fantastic resource to obtain your started.
It requires you through that steps of building a tableless design.
Basic CSS Layout Series – Infinitely Looping
" div design" is usually labelled as CSS layout, CSS-P (positioning), or perhaps tableless layouts.
Because poster above brought up, its better because it permits you to do a great deal more.
Other explanation why CSS is better include
- Presentation is seperated on the structural markup. This allows you to change styles without even coming in contact with your HTML internet page.
- The stylesheet is definitely loaded on initial request and receives cached by the browser. All subsequent asks for which request this stylesheet will use the cached version, making the page load faster rather than loading all this layout markup from the table tags.
- CSS gives you loads of powerful features, a lot of the most used staying the: hover along with: focus pseudo tuition. And different strategies to positioning. Floating photographs, absolute positioning(can often be used for overlapping elements) z-index(layering), fluid layouts (layouts that expand to suit the entire browser, all element widths are represented for a % of the resolution). Easy background images on tons of different elements (used intended for button hovers).
- Using a tableless layout causes A LOT cleaner markup. Tables require a huge amount of < tr> and < td> tags everywhere we look.
< td> Recommendations my content section< /td>
These days css..
< div id=" content" >
Recommendations my content section
This all accumulates.
The list continues on and on,
the one master of using tables is always that the layout will look uniform overall browsers and file sizes. CSS is a little bit harder when it comes to cross browser match ups, but the electricity and features available through the use of css and also many many beneficial points for CSS, tends to make CSS a totally winner when expected Table vs Tableless.
And so.. never use a table right DRASTICALLY WRONG.
Dont utilize them for structure. But if you’ve something like
1 / 3 Qtr
Fourth of july Qtr
you should wanna use a table, look during it, it seems as if a table.
Anyways, if data is usually displayed in a new column/row format, feel free to use tables
Most above posts are usually right on, but there’s additional important aspect of css as a css designed site is additional search friendly. Search engines like google like to scan " readable simply by humans" code, meaning, there is less markup code with css which often allows a optimization to scan a page quickly and completely. If there are a lot of nested tables along with other needless markup, it may possibly hinder a search engine.
Having IE, a < table> should fully load before it truly is displayed… loading is found slower.
All right, now I understand far more. Thank you for many
Table is usually more browser child stroller.
Only when you care about 0. 1% associated with browsers. The alternative 99. 9% (literally) will support just about any layout done through semantic markup and also style.
I haven’t made use of a table for layout in four years.
You could be as semantic since you want, IE6 and 7 will not cooperate due to be able to rendering issues as well as the box model plus the way they address things.
Why were conditional reviews introduced Why didnt microsoft just say ‘hey, be semantic itll often be perfect’ They identify their is web browser inconsistencies
Why is height around ie7, 8 along with ff3 treated as min-height in ie6
A table is simple for browser child stroller, but there are extensive negatives (read my own other post above).
But, so is a fixed-width layout
liquid layouts might need loads of tinkering for cross browser implementation.
Suddenly css will be supported fully.
I realize that FF3, opera, safari and ie8 render almost the exact same now.
yes but it’s essential to tell IE the way to render using a meta tag or this really is quite problematic.
IE6 will render as itself as long as:
- You have a DOCTYPE
- The page is valid for this DOCTYPE (at least for consistency)
- There are usually no other heroes, even whitespace along with an XML prolog, previously mentioned the DOCTYPE.
If you violate any of these items, you could set IE6 into Quirks Mode understanding that makes it render like IE5, which can be a train smash.
As long as you try to not fight the browser’s healthy positioning of a few items, IE6 is literally not as awful as I once thought it was before. Unless the internet site is very intricate, only maybe 5% or maybe 10% of my own CSS exists in order to tell IE to render a specific way.
It can be boring as terrible to read, women and men CSS spec is usually extremely useful. After you know why that rendering engine has been doing what it’s accomplishing, your style linen gets smaller in addition to smaller.