SitePoint Sponsor

User Tag List

Page 1 of 6 12345 ... LastLast
Results 1 to 25 of 131
  1. #1
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css REALLY cleaner??

    Hi, having just re-coded my site using CSS and XHTML I have only one question - IS css any cleaner than the old way? the reason I ask is that it seems every worthwhile effect (100% height, 3 column layout, curved corners, footers...) needs a hack to get it to work!

    When I ask someone about this I get things like 'oh thats going to happen in CSS3 - AND WHEN WILL WE BE ABLE TO USE THAT??? IE doesnt even fully support CSS1 and IE7 is miles away, and only to be included with longhorn - so in summary, can someone reassure me that CSS really is so amazing :P Sure it lets you change your layout in a snap, but only if you meticiously plan it, and your requirements dont change between now and your next redesign - the amount of time spent planning you could be making a new one from scratch!

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    CSS isn't meant to produce 3 column layouts. If you have a fixed laout, however, you can produce just about anything you could with tables.

    Besides, even with all the hacks, you still end up spending less time coding as you would with tables.

    I find it a lot easier when I make a website for a client and then they want say the colour scheme changed. Ths is where CSS really shows it's advantage.

    Even if you can make easy 3column layouts with CSS3 on IE7, I doubt people will do it, as it will be another couple of years untill most people move on from IE 6.

  3. #3
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CSS isn't meant to produce 3 column layouts.
    then surely its a badly designed standard, as a hell of a lot of websites use this as their base design!

  4. #4
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Do yourself a favour: Use fixed width when using CSS. It will make your life so much easier.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  5. #5
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by M. Johansson
    Do yourself a favour: Use fixed width when using CSS. It will make your life so much easier.
    a bit of a throwaway comment there, matt. yes, it may initially be easier, but that does not harness the power of css and brings up its own bag of problems...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  6. #6
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    a bit of a throwaway comment there, matt. yes, it may initially be easier, but that does not harness the power of css and brings up its own bag of problems...
    I think the power of CSS IS the pixel precision that you can use. 100% layouts are the devil anyway. I really hate that the Sitepoint forums are so wide.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  7. #7
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Huscy
    then surely its a badly designed standard, as a hell of a lot of websites use this as their base design!
    I would not call CSS a standard just yet. And Cascading Style Sheets weren't designed to replace or make table based layouts, they were made to allow people to restyle html tags.

    I believe, with Firefox, you can style a div to make it act like a table or a table cell.

    It is possible to make 3 column layouts. You can make them with hacks as you can see in Paul O'B's many examples stickied at the top of the CSS forum.

    If you're not prepared to use hacks, then you might as well use tables. And why follow the 3 column trend anyway? Have a look at CSS Zen Garden. There are plenty of great layouts that don't use the boring, generic fluid 3 col header, footer layout.

  8. #8
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Just want to add,

    The tables vs. no tables war has been going on for a while now, and there are countless threads on the topic here at sitepoint.

    But really, it's up to the designer whether he wants to stick with tables, or take that step forward. Both ways have their benefits, and disadvantages, but clearly neither are perfect.

    I use CSS because it saves me time coding, and I find it easier to get what I want in then end then I could with tables.

    Looking at a few leading companies in my area, www.reactive.com and www.dtdesign.com, they are still using tables for layouts. Maybe it works better for them, but for me it sure doesn't.


  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    I still can't get tables to work - I don't know why everyone likes them so much

    I find css much easier to manage and cleaner to code.

    As mstwntd said:
    Both ways have their benefits, and disadvantages, but clearly neither are perfect.
    Use the best tool for the job in hand (for me that's usually css ).

    Paul

  10. #10
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry i wasnt arguing tables vs no-tables, rather that CSS as a 'standard' - i know someone said it wasnt, but i cant think of a better word - isnt too well thought out, whats there is good but its as if it was developed without thinking about what it is there to replace. also whilst i know this isnt the w3c or anybody elses fault, there is NO POINT in something working in ff/mozilla if it doesnt work in IE - no serious person would use code which cant be properly implemented by 90% (+?) of the target users!

  11. #11
    SitePoint Addict o~~Goatee~~o's Avatar
    Join Date
    Jan 2004
    Location
    North Yorkshire UK
    Posts
    350
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Huscy
    there is NO POINT in something working in ff/mozilla if it doesnt work in IE - no serious person would use code which cant be properly implemented by 90% (+?) of the target users!
    I use CSS in all my work, simply because when I started more serious web development (a few months ago), I thought I might as well start by using CSS. I've found that providing your XHTML and CSS are valid, then you will have very few problems in modern browser compatibility. Its usually just very minor differences.

    My very first proper website was made with a CSS 3 column layout and I think it works great.

    I made my own site last year using Dreamweaver, which has a table layout. I have found it to be very difficult to manage and update. My CSS-based pages are a doddle to update as the div's are completely independent of each other.

    And yes, I think it is a hell of a lot cleaner. My homepage currenty has approx 320 lines of HTML and is approx 21k. I redesigned the page recently with a CSS layout and it now has approx 78 pages of XHTML and is around 4.3k. Much cleaner

  12. #12
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the number of lines does not make it cleaner - i could use less lines in php by using a goto, but i dont

  13. #13
    SitePoint Addict o~~Goatee~~o's Avatar
    Join Date
    Jan 2004
    Location
    North Yorkshire UK
    Posts
    350
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must have misunderstood your definition of cleaner.

    To me, my old table based code is messy. My CSS based code is what I would call clean and much easier to manage.

    Tbh, I didn't need anyone to tell me that CSS is a wonderful tool. Just by giving it a go and experimenting I realised that it is very powerful. I don't use it because its fashionable or popular, its just bloody good and easy to use.

  14. #14
    SitePoint Zealot want2design's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must say, I really was a tables fan boy up until the last few months. I got into the habit of creating designs in Photoshop, exporting them, then editing and adding nested tables to create the final layout. I was happy with this method, as I had knew what I was doing and how I could achieve the result I wanted.

    However, recently I find myself confused as to which I find more convenient. On one hand, I have CSS and DIV positioning which allows the design to be completely overhauled in a matter of a few minutes, on the other hand I have TABLES which allows me to create a design that is almost identical in all browsers.

    My main concerns with CSS is the support it currently has with the leading browsers, and I guess overall I do not yet feel comfortable designing using DIV positioning. I also get the impression with CSS, that it is mainly a "boxy" design method, and a lot of "default" websites come about due to this (I'm not sure if that makes sense or not).

    Anyways, if CSS and DIV positioning is the way the internet is going, I am willing to do my best to learn it.

    (Sorry if I have rambled on, it's 3:30am here).


  15. #15
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Someone should point out that using CSS and tables are not mutually exclusive. If you want a 3 column design, great, use a 3 column table for the content area. But control the look of it, and the items it contains, with CSS. Lot easier than hacking away to make the thing cross-browser compliant, or relying on javascript to handle some things, etc.

    WWB

  16. #16
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Huscy
    the number of lines does not make it cleaner - i could use less lines in php by using a goto, but i dont
    so why don't you?

    because you realised it becomes a pain to maintain. because you realised that it's better to modularise your code (in functions, or objects, depending on whether you're a procedural or OO kinda guy) so you can change individual bits at a later stage without having the recode the whole lot, and you can reuse bits (with slight modifications perhaps) in future projects.

    going back to your thread starter
    Quote Originally Posted by Huscy
    the amount of time spent planning you could be making a new one from scratch!
    the same can be said about modularising your code, no? the time spent planning your functions/objects the first time around is certainly greater than writing some quick and dirty spaghetti code with gotos and things.
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  17. #17
    Put your best practices away. The New Guy's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    2,087
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    While back I created, a website, and while working on the server-side end, I got really bored of the layout. So I drastically changed it in about 10 minutes with CSS. Then later I got bored of it again. The third time, I actually took out tags, and it looks even better now.

    This is one of the best features of CSS. Its like PHP OOP vs PP. OOP is slower to code, but much better in the long run.

    Looks like your at stage 4
    "A nerd who gets contacts
    and a trendy hair cut is still a nerd"

    - Stephen Colbert on Apple Users

  18. #18
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol is that the thread in general chat?
    good posts, renewed some of my faith i think i posted this thread at like 3am when i had used a few hacks and it still wasnt working in IE lol

  19. #19
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Huscy
    also whilst i know this isnt the w3c or anybody elses fault, there is NO POINT in something working in ff/mozilla if it doesnt work in IE - no serious person would use code which cant be properly implemented by 90% (+?) of the target users!
    Hey that is not at all what I was meaning, I was meaning that CSS support is getting better, and possibly will get to a stage where you can do just about anything you want. While it may still be a while away, (because of stupid IE) we have something to look forward too.

  20. #20
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah i know - just think if microsoft decided to use the gecko engine tomorow there would be world peace!

    offtopic: im stuck with something if anyone wants to completely restore my css faith in my other thread
    </offtopic>

  21. #21
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Huscy
    yeah i know - just think if microsoft decided to use the gecko engine tomorow there would be world peace!

    offtopic: im stuck with something if anyone wants to completely restore my css faith in my other thread
    </offtopic>
    hmm, Micorsoft is really slowing down the evolution of the internet.

  22. #22
    SitePoint Wizard megamanXplosion's Avatar
    Join Date
    Jan 2004
    Location
    Kentucky, USA
    Posts
    1,099
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree that Microsoft is slowing down the evolution of the internet and will continue to do so. Microsoft themselves know that Internet Explorer development has halted almost completely, but they will still ship their outdated browser because it's theirs and not one of their competitors. If Microsoft would start shipping Firefox or Opera, all of my troubles would be gone. Anyways, back to the topic at hand...

    Is CSS code cleaner? Absolutely. Those who say that it takes to long to "plan" simply do not know what they are doing. CSS-based designs do not require planning (the design itself does, but not the coding behind it) because the building blocks are already there for you. If you need to have 3 columns/divisions on the page, use 3 divisions, if you need to header text for your logo or your page-section titles then use H# tags accordingly, etc. Code planning is almost obsolete with CSS-based design, CSS-based design is nothing more than visualize and construct, which is more than I can say for HTML-based design which require you to plan out how all of your 25 nested tables will fit together. Like I said, CSS doesn't require the intricate planning that HTML requires, you are just not comfortable using the language yet. As for the hacks, they are unneeded 90% of the time from what I've seen. If people would spend more time figuring out why they need those hacks instead of manufacturing the hacks, we'd see a lot less of them.

    Is CSS cleaner from a user perspective? Absolutely. CSS is still a much cleaner language to be using for design work. For example, how much cleaner do you think article/news site would be if they quit presenting the "print page" buttons and instead just used CSS which offers printer-only designs without user interference? Why do I need two options for printing (one in the browser and one in the page), one which takes up all of my ink and one that doesn't? Just give me the option that is logical and in the place where it is always the same, the print button in the browser. What about slide shows? The HTML method would require you to make about 20 pages with "Next" and "Previous" links at the bottom and will require you to wait for each slide to load it's images, while the CSS method only requires one page and one stylesheet which crops the pages and all of the images load the first time and you do not have to wait at all for the other slides, and can be navigated by the keyboard (which is much better for presentational purposes, nobody wants to see a presentation with a cursor flying around clicking things). What about handhelds, do you want to do what Invision Power Board has done by providing "Lo-Fi" links on every page which are basically search engine spam, or would you rather have it integrate seamlessly within the browser interface by providing alternative stylesheets which the user can pick from while keeping the search engine results pages from being diluted with useless results? What if pages which used FONT tags to create large text for sections would migrate over to using actual header tags while using CSS to style them to allow their users to browse their sites using "S" and "W" to jump between page sections (Spatial Navigation)? I could list one hundred more reasons for why CSS-design should be used instead of HTML-design from a user perspective.


    Just my 2 cents on the subject

  23. #23
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Huscy
    sorry i wasnt arguing tables vs no-tables, rather that CSS as a 'standard' - i know someone said it wasnt, but i cant think of a better word - isnt too well thought out, whats there is good but its as if it was developed without thinking about what it is there to replace. also whilst i know this isnt the w3c or anybody elses fault, there is NO POINT in something working in ff/mozilla if it doesnt work in IE - no serious person would use code which cant be properly implemented by 90% (+?) of the target users!
    CSS as a standard (CSS1 anyway) happened back in 1996. Think about the state of the Web eight years ago, if you were even on it back then. That's even before table layouts were big (this is around the time of frames), so how was it supposed to replace them? As for the 3-column thing, you don't need CSS3 for that; you can do it with CSS2 if you wanted a tableless layout, or even CSS1 if you don't mind a hybrid approach with a simple table for structure/layout and CSS for everything else like padding, etc (CSS2 came out in 1998 by the way; it's not the W3C's fault that browsers are slow to implement things).

  24. #24
    Non-Member
    Join Date
    Jan 2004
    Location
    Planet Earth
    Posts
    1,764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If Microsoft continue to avoid the issues of web standards, and continue to develop IE to their own (antique) standard, then their browser is simply going to go the same way as Netscape 4

    The sooner the better, even though I mostly use IE On the point of CSS being cleaner, yes of course it is

    Just finding that fact out myself now, as I've mosted used TABLEs, this has been annoying me for a while now, as when you look at it, not too far in the future, the W3C will say, 'F*** it, let's leave out TABLEs' in their specification, making a lot of sites look utterly crap overnight

    There is more effort needed of course to avoid using TABLEs, but it's worth it I think, and I'm not really a designer either, making the whole matter even more time consuming for me

    Another point I'd like to make, is that a lot of sites if you look at the source, you will see TABLEs used ? Looking closer, you'll see a lot of spacers (GIFs) used as well, which in my view, belong to the 4th generation browsers.

  25. #25
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Widow Maker
    not too far in the future, the W3C will say, 'F*** it, let's leave out TABLEs' in their specification, making a lot of sites look utterly crap overnight
    even if the W3C dropped tables - which they won't in the foreseeable future, as the table construct is quite valid for tabular data - from a new spec, sites won't look crap overnight. they won't actually change at all. because even if a new spec comes out, it'll take years before all browsers in the wild will support it, and it's likely that general browsers will still have backwards-compatible modes that enable them to render at least xhtml 1.0 strict (if not even html 4.01) for quite a while...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •