|
| |
|
|
pcguy
Posts: 125 From: None Status: offline
|
CSS or Tables? No, seriously... - 9/26/2007 9:45:08
Ok, the great debate... I know CSS has come a long way...and I use it alot for styles....but so far, I'm hesitant in taking the leap to use it for positioning and layout...why? Tables are hands down the most compatible across all browsers for layout - ok, tables were not originally designed for layout use, but I don't even think you can argue the point that they are most widely used. CSS, while cool, and all that fluff - I'm a bit scared since there are so many CSS issues across browsers, versions, etc...(especially for positioning/layouts) little CSS viewability issues in browser X, version 4.2.3, etc...from what I read, CSS style stuff is becoming very compatible across most browsers, but the layout/positioning aspect still has a way to go.... Is it too soon to go full CSS? What are others doing? Thanks for any input!
|
|
|
|
pcguy
Posts: 125 From: None Status: offline
|
RE: CSS or Tables? No, seriously... - 9/26/2007 10:01:37
What do you use for web design? DW? FP?
|
|
|
|
jurgen
Posts: 385 Joined: 1/9/2007 From: Castle Rock, Colorado Status: offline
|
RE: CSS or Tables? No, seriously... - 9/26/2007 10:14:18
I use DW but mainly you can find me dealing with notepad.
_____________________________
Wedding Dresses Colorado
|
|
|
|
Tailslide
Posts: 6292 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: CSS or Tables? No, seriously... - 9/26/2007 10:20:20
I've used CSS for 4 years professionally with no problems at all - makes my life a lot easier as my sites are much much easier to maintain. Tables are fine - but only for tabular data not for layout. Plus, CSS layouts are more accessible that tables, easier to set up print and pda stylesheets and are generally better cross-device (by that I mean you can quite often read the layout on more device types than you could with a table). There aren't as many issues as a lot of table-layout fans would have you believe. Like anything, once you get to grips with it you rarely come across something that you just can't figure out. Problems only arise when people don't use good coding standards - i.e. when they use invalid code and no DOCTYPE and then wonder why it's all gone wrong! You need to ensure that you're using good markup, that you have a DOCTYPE and that you keep checking in different browsers as you build. Believe me - I'm the lazy type, so if CSS layouts were that hard - there's no way I'd use them! I'm also a big semantic code fan - which means that I try to use the correct markup for the correct purpose - e.g. a list for a list, heading tags for headings and tables for tabular data. Following that line of thought, tables are not meant for layout so it's incorrect usage. CSS is 10 years old so it's definitely time to move over! I hand-code using Araneae.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
pcguy
Posts: 125 From: None Status: offline
|
RE: CSS or Tables? No, seriously... - 9/26/2007 10:22:10
Thanks Taildslide - good input....
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: CSS or Tables? No, seriously... - 9/26/2007 10:33:33
quote:
Like anything, once you get to grips with it you rarely come across something that you just can't figure out. Exactly. Personally, I haven't designed one site in the past year with tables.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
pcguy
Posts: 125 From: None Status: offline
|
RE: CSS or Tables? No, seriously... - 9/26/2007 12:49:41
If you have DW CS3, this seems pretty CSS robust - it searches for any "bugs" in the CSS for all the browsers, and even tells you the fixes.... I believe I'm going to "dive in" the DW CS3 and see what damage I can start with CSS! ;-)
|
|
|
|
ThomasMobley
Posts: 89 Joined: 9/8/2007 Status: offline
|
RE: CSS or Tables? No, seriously... - 9/26/2007 20:15:21
I'm with tail....use tables where tables make sense (or where the person paying you requires it). Don't use them for layout. I keep seeing DW and DWR or DRW, whatever those things are. I do all of my asp coding in intedev, and my php or css in phpED. I hadn't even thought about this being a front page forum until i commented on someones use of ::var:: and mentioned that I didn't understand that (though I did give them appropriate ado code in response) and someone else said "well, this is a frontpage forum." Shows how much attention I pay to some things. So what exactly does frontpage do that I can't do with standard asp? I kinda get the ::var:: which seems like a shorthand way of doing something that I can already do...is it just pretty much using extensions (which I would think are overhead on top of the asp engine) to save some keystrokes? Is there something in frontpage that I can't do with asp, or is it like wysiwyg for point and click programmers? Once a fellow programmer (he was a mainframe vms programmer) showed me how easy it was to create a form with a C wysiwyg, and when I said so do this in the code, he had no idea what to do. He just used the wys part of it and had no idea how to modify the code in C to do what I asked him to do. I told him to learn C and then use the wysiwyg stuff to make it easier. So I guess I'm really asking, is frontpage a way for people who don't know how to code to create things that they then come here to ask questions about how to make it work? And I'm not anti-wysiwyg. I've used them for years for multiple languages in desktop apps. I just notice that they allow people that have no clue to create things they have no clue about, and it's aways better to start with the code and use the design tools to make it easier for you once you get the code. Right now I'm only about 6 months into asp and I still do everything by hand, and I haven't found that frontpage or the gui part of interdev really makes anything come together faster. I do java too, and I don't find that the netbeans gui editor really helps either, though I use the code editor to hand code my java stuff. Does that make any sense? I've just wrapped up a project for a client and I'm a couple beers into the ether, so that may not have come out right. But even if it doesn't, I don't need a vertical wind tunnel....beer is a cheap way to fly tailslide...lol
|
|
|
|
Tailslide
Posts: 6292 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 3:03:28
quote:
ORIGINAL: ThomasMobley But even if it doesn't, I don't need a vertical wind tunnel....beer is a cheap way to fly tailslide...lol Yeah, yeah, yeah! When I first came here I was very against WYSIWYGs because of the poor code they spew out - I'm still not what you'd call a fan because even with EW and Dreamweaver if you allow it to "do it's thing" by itself it will create a site (possibly using CSS rather than tables) that is equally as ugly code-wise as anything FP ever created. By that I mean that they tend to use absolute positioning and classes on everything plus extra divs everywhere with stupid names like .12. However, I did realise after a while that these things do have their place (my teeth are gritted, can you tell?) either for hobbyists (in the nicest possible way) who are just doing sites for friends and family or for people who understand the code properly and can go in afterwards and clean up what the WYSIWYG has done. What disturbs me is when you get professional website designers who use these tools badly to build sites of poor quality for their unsuspecting clients. That really p*sses me off. Equally it p*sses me off when these people say - "well I would build it properly but it would cost me time/money to do so" - Total B*llocks! I'm ranting again aren't I? *sigh* I know it's part of the charm of HTML to basically be forgiving but sometimes I do hanker after the simple right/wrong of programming languages like PHP. If you get it wrong - it falls over and laughs at you. It appeals to my black and white nature. Because I have this black and white sense of right and wrong generally (not necessarily a good thing I know) I do like to try to implement that in my work and use CSS for layouts, valid semantic markup in the page itself (and as little actual markup as possible), unobtrusive javascript to govern behaviour and finally attempt to make the whole lot work for as many people as possible (ie make it accessible).
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
pcguy
Posts: 125 From: None Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 7:49:14
All that said - can any of you talk about the pros/cons for absolute positioning vs. relative?
|
|
|
|
Tailslide
Posts: 6292 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 10:54:46
Absolute and relative positioning need to be used in tandem to work properly. Personally I avoid using AP as much as possible and therefore I don't need to use relative positioning. Sometimes adding position:relative can fix the odd IE bug but apart from that it's unecessary. AP layouts can often be very brittle. It's not that using AP is wrong - it's just hard to get right. I prefer to use the normal flow of the page and float divs to get the structure. Much more flexible and predictable. The only thing you need to remember is to clear the floats.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
ThomasMobley
Posts: 89 Joined: 9/8/2007 Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 11:06:21
quote:
ORIGINAL: Tailslide Personally I avoid using AP as much as possible and therefore I don't need to use relative positioning. Um....if you don't use absolute you do use relative...it's one or the other. I don't think you said it like you meant it. For a menu slideout you have to use absolute I believe. At least I haven't found that relative works for that. But I agree that it should be used sparingly.
|
|
|
|
pcguy
Posts: 125 From: None Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 12:32:47
What is clearing the floats, and what happens if you don't?
|
|
|
|
Tailslide
Posts: 6292 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 13:30:20
quote:
ORIGINAL: ThomasMobley Um....if you don't use absolute you do use relative...it's one or the other. I don't think you said it like you meant it. Nope I meant exactly what I said - I avoid both if possible and go with what is in fact the default - position:static although since it is the default you don't need to specify it.\ Here's a good tutorial on CSS positioning: http://www.barelyfitz.com/screencast/html-training/css/positioning/ There's nothing wrong in using AP for stuff like menu positioning or positioning small bits of a site like a search box for instance. BUT when it's used for large chunks of a site it can lead to the page breaking easily if not done very carefully. So I find that using the normal flow of the page and floating elements much easier to work with. When you float an element it is virtually removed from the normal flow of the page which mean that other elements can no longer follow on naturally from it - they may collapse up around it and in modern browsers (basically not IE) a div with an uncleared element in it will allow the element to break through the layout or in many cases the background image won't continue past the uncleared element messing up the layout. So you need to clear the floats either by having a clearing element after the floats or by adding the clearfix hack or by adding overflow:hidden to the containing element. Here's more on the topic: http://www.quirksmode.org/css/clearing.html
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
pcguy
Posts: 125 From: None Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 14:08:08
You guys (and gals) are kind of proving my point - there are so many bugs (especially with IE) that you never really know how it's going to look unless you test it in all the different browsers, and worse yet, browser versions...(hense my love for tables) What do you folks recommend for browser testing? I certainly do not want to install all the different browsers and versions.... There must be something -good- out there that can render a page and show it in all the different flavors, with tabs or something...? Thanks for helping out this CSS newbie....
|
|
|
|
Tailslide
Posts: 6292 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 14:25:12
Well personally I have IE4-7, Opera, Firefox, NN and Safari on my PC and Camino, Safari and Opera on my mac. An alternative would be to get a group membership to Browsercam (look on Sitepoint) which would cost you around $30pa and is very good. There are some other sites out there like browsershots etc which will take various screenshots for you. You need to test in many browsers but it's hardly difficult to do. I test in Firefox, IE7 and IE6 as I go along and then test in the others when I've finished. I don't bother with different versions of the good browsers like Firefox and Opera. To be honest, if it works in Firefox, IE7 and IE6 then you're probably fine in the others. It is worth checking because they sometimes throw up a weird issue but generally it's just a quick check rather than a long process. I also cater for the older IE browsers which can add more issues but many people don't bother with these anymore. There are a fair few bugs - mainly in IE but as said, once you get to grips with CSS you can easily avoid these. The advantages of using CSS definitely outweigh the disadvantages. Surely even with a table layout you'd test in different browsers wouldn't you? Basically, use a DOCTYPE; use valid code; look into CSS resets; look into Faux Column technique, check as you go along; keep it simple and you're fine. Don't panic and dump CSS because you run into a couple of problems - as mentioned, most are easy to sort. Come back here and ask and we'll help you through it. You'll find that you'll end up with a good solid structure for single column, two column and three column layouts that work every time in all browsers. After that, it's just tweaking presentation. Faux Column technique is a life-saver and I use it in pretty much all my sites. You can't expect to get to grips with it all in a very short time - it's a totally different way of building websites so it does take an investment in your time to learn (but then presumably so did table layouts). Don't look at the negatives, look at the positives - with a well structured CSS layout if your client decides to switch the sidebar from left to right for instance, you can change maybe 2 rules in the stylesheet and it's done! Think of the time you can save! Also you can add PDA stylesheets to the sites with little effort - that's a great added selling point!
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
pcguy
Posts: 125 From: None Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 14:31:48
Yeah, I bought a book, and I'm diving in....I wrote a note to the tables - it went something like this: I'm not abandoning you entirely, but I need my space... That said, yes, I do test with different browsers - but only in a few late version browsers - and ironically, it's to test my CSS styles mostly. And I'm not arguing about the benefits of CSS - I see them, trust me. I feel I'm a very capable web developer, but I think learning CSS inside and out, will "round me out" like Mom always wanted ;-)
|
|
|
|
ThomasMobley
Posts: 89 Joined: 9/8/2007 Status: offline
|
RE: CSS or Tables? No, seriously... - 9/27/2007 15:19:42
Dang! Tail got me again. Relative without positioning is the same as static though, so it's kinda almost pert near close to the same thing.
|
|
|
|
powersitedesign
Posts: 117 Joined: 11/12/2003 From: Conway, Arkansas Status: offline
|
RE: CSS or Tables? No, seriously... - 9/29/2007 13:53:17
I am using CSS more and more and embracing it a lot, especially on dynamic sites but I do somewhat agree w/ pcguy, all of the browser technologies still aren't there in my opinion, and I tend to use tables when neccessary. Plus it's what i am used to and it saves me a whole lot of time. As time goes on though i find myself using CSS more and more, who knows one day I might be 100% table-less but I don't see it in the near future.
_____________________________
Cotton Rohrscheib http://pleth.com http://powersitedesign.com http://cottonrohrscheib.com
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|