Just not making sense!

Discussion in 'CSS' started by SolutionX, Mar 30, 2007.

  1. #1
    :confused: I've been reading tutorial after tutorial on making css layouts over the past few days. I've even done some hands on experimenting, but none of this is even starting to make sense. I seriously had an easier time catching on to C++. Is it just because all I've ever used css for in the past was to format the text in my tables? It just seems like nothing is dependable with css layouts and you have to check it in 50 different browsers, then keep checking it again whenever a new browser version comes out, to make sure your hacks weren't broken.

    Is this really worth it until there's some kind of real standard way to do it without hacks? Is this really a step forward? I know all the benefits, but when does the law of diminishing return come into play?

    Maybe i'm just frustrated. Well, definately i'm frustrated, but I really wanna give up and go back to the dark side of table layouts! :mad:

    I generally catch onto different programming languages and programs quickly, so how much longer of this mushy brain feeling will I have to go through?

    Maybe I need a very thorough book to read on this one?
     
    SolutionX, Mar 30, 2007 IP
  2. OwenC

    OwenC Peon

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The tricky thing about CSS is that it's a declarative language. In other words, what you're reading isn't sequential, but rather applied to particular tags in your HTML.

    The best thing you can do is mess around with it. Get a working page and start tweaking to see what changes. Don't just read about it, get your hands dirty
     
    OwenC, Mar 30, 2007 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    CSS is like a lot of things, once you know how to do it, you can't remember why it once seemed so hard. :) It is a complex and powerful language, but it is really not as difficult as neophytes want to make it. Part of the difficulty results from not yet having unlearned the bad habits you already have. Using css-p means writing perfectly semantic html without any thought of how it is to look in the browser. You don't think about headers, footers, or columns. Nor do you consider fonts, their sizes nor any other aspect of presentation. So, there are no <div> tags, because they are aggregating tags, to group other element as a styling context.

    After you have that semantic well structured and valid document, you can start adding style hooks and their rules. As soon as something goes wrong, you know where the issue lies.

    Don't worry about x-browser hacks. Modern browsers follow the rules, so you will automagically have to write good css. If it doesn't look right in Firefox et al, you modify the rule. If it looks like you want in the good browsers, and IE doesn't look right, you're still OK. IE's bugs and support deficiencies are well known, as are the hacks, work-arounds or the necessary dumbing down. While learning, the fixes can wait. When you get better, you'll be doing what you need on the fly.

    Speaking of c++, just how long did it take for you to be able to write a non-trivial application? Why would you expect that you could write presentation rules for a non-trivial document, in a new and different presentation language any quicker (disregarding the APIs you need to know for c, c++)?

    Hang in there. It really does get easy.

    cheers,

    gary
     
    kk5st, Mar 30, 2007 IP
  4. SolutionX

    SolutionX Peon

    Messages:
    1,161
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well, I never fully learned C++, just what I had to in order to suppliment a .net program I was writing, so that wasn't really a fair comparison. I think i'm just getting tired from all this and some other things.

    Thanks for the encouragement. I'll keep at it and hopefully be able to help someone else out in return before too long.
     
    SolutionX, Mar 30, 2007 IP