| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
CSS vs. Tables
Yeah I know we all heard about this and read about it somewhere. I have a question. I have recently done a lot of reading and testing with CSS driven sites. Meaning I would format my site using stylesheets and not tables. Its all great and I agree with having these files external to the html files. The question is: what happens if you want to design a site with lots of graphics? For example you could use Adobe Imageready to slice an image to make a website. This in turn creates tables and places the sliced images in their respective place. How can you do this with CSS??? I guess you would have to slice an image and place each one using DIV tags... that can be a very painfull and long process... Am I missing or mistaken about something?? so far, all the CSS sites I've seen were al pretty simple.
Please let me know what you think. Thanks, Oren |
|
#2
|
||||
|
||||
|
I hardly call the masterpiece of http://www.csszengarden.com simple... you should check out some of the designs there.... all totally different and original, but all using the EXACT SAME XHTML
![]() Instead... you make your website layout in Photoshop or whatever, then markup your document structure. Once you're done, match the layout to the structure and export the images as appropriate. <div> elements are not meant to be used for page layout either.... they're just a semantically neutral container... which so happen to be the most popular styled element. And you're not meant to call them "tags" either |
|
#3
|
|||
|
|||
|
Is there a CSS Tag that IS meant for page layout?
|
|
#4
|
||||
|
||||
|
There are no 'layout' elements in CSS. CSS simply controls the presentation of elements, and by manipulating the elements you achieve the desired layout.
I think what DUDE meant was that a lot of CSS tableless design newcomers use the div element to replace the table tag, leading to 'divitis'. As stated, the div element is a semantically neutral container which can be used to group related elements together.
__________________
-
thought-after | my thoughts on web development Get Firefox, the developers browser Budget hosting - recommended [/left] |
|
#5
|
|||
|
|||
|
"<divitis>" is mainly caused by those who think that "div is for CSS layout" which is wrong. You can style any element.
But even with a page full of <div>ision elements, it still uses a lot less markup than a table-based page. |
|
#6
|
|||
|
|||
|
yeah yeah.. thats what I have!! lol.. anything new for me to learn?
And I agree that a bunch of div's is still less markup than the tables. Although, I think it is harder sometimes to find the ending points of some divs when you have a pile of them. Do you feel tables are still a main component of design? |
|
#7
|
|||
|
|||
|
A good solution for hunting through code is to markup the closing elements. This is the usual convention:
Code:
<div id="header"> </div><!-- /Header --> Like you do in bracket-syntax languages to denote what kind of statement delimiter you've just put down: Code:
if (x = y) {
do stuff;
} //if
|
|
#8
|
|||
|
|||
|
Good point. Thats whats ive had to start doing.. plus writing very neat code helps too. Been times ive had to actually print the code and draw connecting lines to opening and closing div tags..
![]() |
|
#9
|
||||
|
||||
|
I dunno if this was already posted on your board previously, but here's a really great breakdown of what CSS is, what it can add to your bottom line, how to convince oneself/others to use it, and why the web was meant to be viewed with the CSS layout. http://www.hotdesign.com/seybold/
if you've already seen this, I apologize. me = n00b at ASPfree. |
|
#10
|
|||
|
|||
|
helpful info on this. Thanks.
|
| Viewing: ASP Free Forums > Web Design > Web Layout > CSS vs. Tables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|