Some CSS "must knows" from me, and please share yours

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lycanthrope
    Confirmed User
    • Jan 2004
    • 4517

    #46
    Originally posted by testpie
    Here's a quick tip:

    Instead of wrangling with every element and having to put margin:0;padding:0; use this at the top of your CSS:
    Code:
    * {
     margin:0;
     padding:0;
    }
    This works by using the wildcard match to make every element on the page have no padding and no margin without having to constantly redefine these.

    Enjoy.
    The single best thing you can do to "zero out" every browser across the board

    Comment

    • borked
      Totally Borked
      • Feb 2005
      • 6284

      #47
      Great thread and great idea!

      But, there's a lot I don't understand with CSS, and Stuart's example below shows my ignorance. Take the Acid 2 Test and see if your browser is compliant...

      Safari 3 passes the test, Opera 9 neerly passes (nose colour wrong), and besides some very minor other browsers that's it.

      The reason I bring this up is that Safari 3, 100% compliant, renders the below wrong. There is no header - the images start and the text wraps around.

      CSS is great, and these kinda rules are essential, but it goes much deeper than simple rules - the only rule is to test in as many browsers as possible.

      Originally posted by StuartD
      Thank you. I decided to put together a couple of examples just to demonstrate... maybe not the best (they're done fast) but they should give you the right idea.

      1. This is the thumbs idea from #5. You can resize the browser as wide or as narrow as you like and see how the thumbs will just fit.
      I challenge you to try it with a table layout.
      http://www.9xs.net/thumbs.html



      2. This one is a basic layout with a header, left and right column and a footer (copyright).
      Look at the source code to see the actual html (everything after the <body>).
      There's almost nothing to it at all. Take out the CSS at the top of the page and you'll have a very basic page.
      http://www.9xs.net/layout.html



      Hopefully these help to illustrate some of my points.

      For coding work - hit me up on andy // borkedcoder // com
      (consider figuring out the email as test #1)



      All models are wrong, but some are useful. George E.P. Box. p202

      Comment

      • Twisted Dave
        Confirmed User
        • Mar 2006
        • 3635

        #48
        Excellent thread! BUMP!


        Custom Cartoon Mascots - ICQ: 243355699, Email: [email protected] or Click Sig - 15% referrals. Send me clients, make money!

        Comment

        • Tempest
          Too lazy to set a custom title
          • May 2004
          • 10217

          #49
          Originally posted by testpie
          Here's a quick tip:

          Instead of wrangling with every element and having to put margin:0;padding:0; use this at the top of your CSS:
          Code:
          * {
           margin:0;
           padding:0;
          }
          This works by using the wildcard match to make every element on the page have no padding and no margin without having to constantly redefine these.

          Enjoy.
          Nice one.. didn't know about *.. there's some special things like that that I'm not aware of.

          Comment

          • StuartD
            Sofa King Band
            • Jul 2002
            • 29903

            #50
            50 CSS tips and tricks....

            Let's keep sharing!
            This is me on facebook
            This is me on twitter

            Comment

            • LadyMischief
              Orgasms N Such!
              • Sep 2002
              • 18135

              #51
              Awesome thread, Stu, bookmarked! You know how much I LOOOOVE Css... grrr

              ICQ 3522039
              Content Manager - orgasm.com
              [email protected]

              Comment

              • MicDoohan
                Confirmed User
                • Apr 2003
                • 791

                #52
                one problem i have with my 3 column wordpress css layouts is how to make the 2 colored sidebar columns go all the way to the bottom - as it stands they only go down as far as there is content in them.

                any tips css gurus ?

                Comment

                • AlienQ - BANNED FOR LIFE
                  best designer on GFY
                  • Mar 2003
                  • 30307

                  #53
                  CSS is the suck and not necessary.

                  Comment

                  • mrthumbs
                    salad tossing sig guy
                    • Apr 2002
                    • 11702

                    #54
                    Originally posted by AlienQ
                    CSS is the suck and not necessary.
                    Start using it and maybe one day your designs will advance the mid 90's

                    Comment

                    • quantum-x
                      Confirmed User
                      • Feb 2002
                      • 6863

                      #55
                      I must say, to me 'pure css' designs, still seem in the realm of 'hacky' at best, but I love making hybrids : let tables make the main structure, throw in divs and css for the rest, match made in heaven.
                      PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

                      Comment

                      • Twisted Dave
                        Confirmed User
                        • Mar 2006
                        • 3635

                        #56
                        Originally posted by quantum-x
                        I must say, to me 'pure css' designs, still seem in the realm of 'hacky' at best, but I love making hybrids : let tables make the main structure, throw in divs and css for the rest, match made in heaven.
                        What are you talking about? CSS is useable without being hacky in the slightest.


                        Custom Cartoon Mascots - ICQ: 243355699, Email: [email protected] or Click Sig - 15% referrals. Send me clients, make money!

                        Comment

                        • cykoe6
                          Confirmed User
                          • Apr 2005
                          • 4499

                          #57
                          Ths is a really great thread. I hate CSS with a passion but as a full time blogger I am always dealing with it in my WP themes. I find that even the simplest adjustment takes forever to figure out in CSS.... but maybe this thread will help me.
                          бабки, шлюхи, сила

                          Comment

                          • Grisey
                            Confirmed User
                            • Jan 2004
                            • 1805

                            #58
                            Not mine but an old bookmark

                            http://www.smashingmagazine.com/2007...-live-without/
                            Segpay Suck Ass Worse Billing Company
                            Allurecash Scammers and don't pay

                            Comment

                            • testpie
                              Mostly retired
                              • Apr 2006
                              • 3231

                              #59
                              Originally posted by MicDoohan
                              one problem i have with my 3 column wordpress css layouts is how to make the 2 colored sidebar columns go all the way to the bottom - as it stands they only go down as far as there is content in them.

                              any tips css gurus ?
                              Just adapt the code from this site: http://www.tanfa.co.uk/css/layouts/c...-layout-v1.asp and remove the footer if you don't want it.

                              Affiliates: DogFart ~ Domain parking: NameDrive ~ Traffic broker: Traffic Holder

                              Comment

                              • testpie
                                Mostly retired
                                • Apr 2006
                                • 3231

                                #60
                                Originally posted by Lycanthrope
                                The single best thing you can do to "zero out" every browser across the board
                                What do you mean?

                                Sorry for the double post.

                                Affiliates: DogFart ~ Domain parking: NameDrive ~ Traffic broker: Traffic Holder

                                Comment

                                Working...