CSS Ninjas: Your clear fix!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Killswitch - BANNED FOR LIFE
    • Jul 2026

    #1

    CSS Ninjas: Your clear fix!

    Alright, so I'm working on a 100% CSS/Div design and I've Googled around and nobody has a definite good clear fix for CSS, what do you guys use?
  • Deej
    I make pixels work
    • Jun 2005
    • 24386

    #2
    clear:both? whachaoutalkinboutwillis!>!?>!?

    Deej's Designs n' What Not
    Hit me up for Design, CSS & Photo Retouching


    Icq#30096880

    Comment

    • Killswitch - BANNED FOR LIFE

      #3
      I have a div with 3 more divs inside of it, those 3 divs use absolute positioning and left attributes to put them where I want them, I then do .clearFix:after { clear: both; } and set the class of that parent div to clearFix but it's still showing the bottom of the div right up against the bottom of the 3 divs instead of the 15px padding there is supposed to be...

      Comment

      • Deej
        I make pixels work
        • Jun 2005
        • 24386

        #4
        Originally posted by Killswitch
        I have a div with 3 more divs inside of it, those 3 divs use absolute positioning and left attributes to put them where I want them, I then do .clearFix:after { clear: both; } and set the class of that parent div to clearFix but it's still showing the bottom of the div right up against the bottom of the 3 divs instead of the 15px padding there is supposed to be...
        OMFG youre using padding?

        start over...

        Deej's Designs n' What Not
        Hit me up for Design, CSS & Photo Retouching


        Icq#30096880

        Comment

        • Deej
          I make pixels work
          • Jun 2005
          • 24386

          #5
          can you show me your code?

          Deej's Designs n' What Not
          Hit me up for Design, CSS & Photo Retouching


          Icq#30096880

          Comment

          • Killswitch - BANNED FOR LIFE

            #6
            Originally posted by Deej
            OMFG youre using padding?

            start over...
            I hate you...

            Comment

            • Killswitch - BANNED FOR LIFE

              #7
              Originally posted by Deej
              can you show me your code?
              Sent you a link over ICQ.

              Comment

              • sysk
                Confirmed User
                • Aug 2007
                • 1005

                #8
                overflow:auto should do it
                icq: 612510168 / email: [email protected] / php ninja 4 hire

                Comment

                • MIDDLE CLASS BLACK MAN
                  So Fucking Banned
                  • Sep 2009
                  • 111

                  #9
                  why dont you ask jack oat oh wait thats you

                  Comment

                  • mechanicvirus
                    Confirmed User
                    • Feb 2005
                    • 4219

                    #10
                    im just here to troll really i have no actual useful information to give

                    Comment

                    • Sands
                      Confirmed User
                      • Feb 2007
                      • 3134

                      #11
                      Originally posted by Killswitch
                      I have a div with 3 more divs inside of it, those 3 divs use absolute positioning and left attributes to put them where I want them, I then do .clearFix:after { clear: both; } and set the class of that parent div to clearFix but it's still showing the bottom of the div right up against the bottom of the 3 divs instead of the 15px padding there is supposed to be...
                      1) Whenever possible, avoid using absolute positioning and instead use float/margin/padding and allow the divs to "fall" into place within the parent element.

                      2) The :after pseudo-class may not work on older browsers.

                      3) Setting an overflow attribute for the parent element, whether it's "auto" or "hidden", should be sufficient to clear the floats.

                      Comment

                      • Killswitch - BANNED FOR LIFE

                        #12
                        Originally posted by MIDDLE CLASS BLACK MAN
                        why dont you ask jack oat oh wait thats you
                        Sorry to burst your bubble Cam, but I'm not this Jack OAT guy you're talking about, I have seen him posting around though, no idea what makes you think he's me... Can even have Eric prove it if you want.

                        Comment

                        • SmokeyTheBear
                          ►SouthOfHeaven
                          • Jun 2004
                          • 28609

                          #13
                          Originally posted by Killswitch
                          Sorry to burst your bubble Cam, but I'm not this Jack OAT guy you're talking about, I have seen him posting around though, no idea what makes you think he's me... Can even have Eric prove it if you want.
                          That's exactly what Jack Oat would say

                          just teasin , i dont know who jack oat is either
                          hatisblack at yahoo.com

                          Comment

                          • Killswitch - BANNED FOR LIFE

                            #14
                            Originally posted by SmokeyTheBear
                            That's exactly what Jack Oat would say

                            just teasin , i dont know who jack oat is either
                            I bet you're Jack OAT!

                            Comment

                            • Deej
                              I make pixels work
                              • Jun 2005
                              • 24386

                              #15
                              Originally posted by Sands
                              1) Whenever possible, avoid using absolute positioning and instead use float/margin/padding and allow the divs to "fall" into place within the parent element.

                              2) The :after pseudo-class may not work on older browsers.

                              3) Setting an overflow attribute for the parent element, whether it's "auto" or "hidden", should be sufficient to clear the floats.
                              Hey hey hey....

                              get back to your cage...


                              Deej's Designs n' What Not
                              Hit me up for Design, CSS & Photo Retouching


                              Icq#30096880

                              Comment

                              • Sands
                                Confirmed User
                                • Feb 2007
                                • 3134

                                #16
                                Originally posted by Deej
                                Hey hey hey....

                                get back to your cage...

                                Comment

                                • Angry Jew Cat - Banned for Life
                                  (felis madjewicus)
                                  • Jul 2006
                                  • 20368

                                  #17
                                  Dear Sands, what are your rates for "Kitten Punching"?

                                  Comment

                                  • Agent 488
                                    Registered User
                                    • Feb 2006
                                    • 22511

                                    #18
                                    who is jack oaf?

                                    Comment

                                    • Sands
                                      Confirmed User
                                      • Feb 2007
                                      • 3134

                                      #19
                                      Originally posted by Angry Jew Cat
                                      Dear Sands, what are your rates for "Kitten Punching"?
                                      Depends on the type of kitten and the kung fu style you'd like me to use. For example, Phoenix Eye Fist on a newborn tabby will run you about $25/hour, whereas the tried and true Crane Style on one of those newfangled breeds will be $50/hour and will require an initial deposit.

                                      Comment

                                      • Deej
                                        I make pixels work
                                        • Jun 2005
                                        • 24386

                                        #20
                                        Originally posted by Sands
                                        Depends on the type of kitten and the kung fu style you'd like me to use. For example, Phoenix Eye Fist on a newborn tabby will run you about $25/hour, whereas the tried and true Crane Style on one of those newfangled breeds will be $50/hour and will require an initial deposit.
                                        Let me know when youre fluent in friday night baby punching... need some fists of fury on the team...

                                        Deej's Designs n' What Not
                                        Hit me up for Design, CSS & Photo Retouching


                                        Icq#30096880

                                        Comment

                                        • Killswitch - BANNED FOR LIFE

                                          #21
                                          Originally posted by Agent 488
                                          who is jack oaf?
                                          Apparently it's me...

                                          Comment

                                          • Nysus
                                            Confirmed User
                                            • Aug 2001
                                            • 7817

                                            #22
                                            I'd like to hire someone for kitten punching too. In the next few days. Please ICQ me with your rates. Thanks.
                                            What name is pr0 / Untouched Markets using these days? Untouched Markets - pr0 - Refund My Money Now

                                            Someone owes me $2,000 because they didn't do any work that was paid for *pointing at pr0 / William / UntouchedMarkets*

                                            See http://www.gfy.com/showthread.php?p=16744521 and for more detailed see http://www.gfy.com/showthread.php?t=948645

                                            Comment

                                            • Glenn Beck
                                              So Fucking Banned
                                              • Sep 2009
                                              • 408

                                              #23
                                              Computerized
                                              Secret
                                              Socialism

                                              Comment

                                              • Catalyst
                                                Confirmed User
                                                • Jun 2003
                                                • 3243

                                                #24
                                                lets see the design you are working on

                                                Comment

                                                • Deej
                                                  I make pixels work
                                                  • Jun 2005
                                                  • 24386

                                                  #25
                                                  Originally posted by Catalyst
                                                  lets see the design you are working on
                                                  problem solved

                                                  Deej's Designs n' What Not
                                                  Hit me up for Design, CSS & Photo Retouching


                                                  Icq#30096880

                                                  Comment

                                                  • Killswitch - BANNED FOR LIFE

                                                    #26
                                                    Originally posted by Deej
                                                    problem solved

                                                    Comment

                                                    • Jack OAT
                                                      Confirmed User
                                                      • Nov 2009
                                                      • 176

                                                      #27
                                                      Originally posted by MIDDLE CLASS BLACK MAN
                                                      why dont you ask jack oat oh wait thats you
                                                      uhhhhhhhhhhhhhhhhhhhhh whuuuuuut? I answer css questions. I don't ask them.




                                                      my icq...... 615294405..... .....jackoatwebmaster@gmail

                                                      I am a webmaster toolbox.. I can do it all.. I am Jack OAT
                                                      mobile sites + xhtml/css + design + wordpress + script install/integration

                                                      Comment

                                                      • fatfoo
                                                        ICQ:649699063
                                                        • Mar 2003
                                                        • 27763

                                                        #28
                                                        Bump for Killswitch and CSS.
                                                        Send me an email: [email protected]

                                                        Comment

                                                        • CPimp
                                                          Confirmed User
                                                          • Aug 2009
                                                          • 2346

                                                          #29
                                                          I think he fixed it.
                                                          three 997 three 55 three 1 ← That's my ICQ. Contact me there. Thanks.

                                                          Comment

                                                          • potter
                                                            Confirmed User
                                                            • Dec 2004
                                                            • 6559

                                                            #30
                                                            Originally posted by sysk
                                                            overflow:auto should do it
                                                            lol.. because the element wouldn't be set to that already right?



                                                            .
                                                            .
                                                            .
                                                            .
                                                            .

                                                            Seriously, I could fix this in two seconds with your code. that, and what browser the problem is in. specially cause you mentioned padding. they all like to handle padding differently a lot of the time.

                                                            <div problem element>
                                                            ::all divs inside this element::
                                                            </div>

                                                            then the css as well

                                                            .problem_element{
                                                            }
                                                            ::all divs inside this element::

                                                            *all elements as well, not just divs. i mean p's span's, anything with css styling


                                                            ... Seriously, me best bet is that you have some floats somewhere which aren't being cleared.

                                                            like;

                                                            div <<-this
                                                            div
                                                            float float
                                                            div
                                                            div
                                                            div
                                                            float
                                                            div
                                                            div
                                                            float float

                                                            "this" div, won't know the end of it's content unless every one of those floats are cleared. big thing to remember is to make sure each one of your floats are cleared. guarantee that solves your problem

                                                            Comment

                                                            • wdforty
                                                              Confirmed User
                                                              • Jul 2004
                                                              • 1824

                                                              #31
                                                              Clearing is for floats you can't clear an absolute element
                                                              icq 157542142

                                                              Comment

                                                              • Killswitch - BANNED FOR LIFE

                                                                #32
                                                                Originally posted by Jack OAT
                                                                uhhhhhhhhhhhhhhhhhhhhh whuuuuuut? I answer css questions. I don't ask them.
                                                                Who are you and why do these idiots think I'm you?

                                                                Comment

                                                                • Zuzana Designs
                                                                  All Your Design Needs
                                                                  • Feb 2005
                                                                  • 20897

                                                                  #33
                                                                  Originally posted by sands
                                                                  depends on the type of kitten and the kung fu style you'd like me to use. For example, phoenix eye fist on a newborn tabby will run you about $25/hour, whereas the tried and true crane style on one of those newfangled breeds will be $50/hour and will require an initial deposit.
                                                                  lolz!!........

                                                                  Website Design - Consulting - Development
                                                                  sarah [at] zuzanadesigns.com - See Our Work

                                                                  Comment

                                                                  • Killswitch - BANNED FOR LIFE

                                                                    #34
                                                                    Hey Zuzana, can you please leave me some examples of dump site designs you've done please, and thank you.

                                                                    Comment

                                                                    • munki
                                                                      Do Fun Shit.
                                                                      • Dec 2004
                                                                      • 13393

                                                                      #35
                                                                      I love Cock Sucking Sluts...

                                                                      I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

                                                                      Comment

                                                                      • Killswitch - BANNED FOR LIFE

                                                                        #36
                                                                        Originally posted by munki
                                                                        I love Cock Sucking Sluts...

                                                                        Comment

                                                                        • Agent 488
                                                                          Registered User
                                                                          • Feb 2006
                                                                          • 22511

                                                                          #37
                                                                          who is josh dirt?

                                                                          Comment

                                                                          • Killswitch - BANNED FOR LIFE

                                                                            #38
                                                                            Originally posted by Agent 488
                                                                            who is josh dirt?
                                                                            No idea.

                                                                            Comment

                                                                            • munki
                                                                              Do Fun Shit.
                                                                              • Dec 2004
                                                                              • 13393

                                                                              #39
                                                                              Originally posted by Killswitch


                                                                              CSS =

                                                                              Cock
                                                                              Sucking
                                                                              Sluts

                                                                              I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

                                                                              Comment

                                                                              • Killswitch - BANNED FOR LIFE

                                                                                #40
                                                                                Originally posted by potter
                                                                                lol.. because the element wouldn't be set to that already right?



                                                                                .
                                                                                .
                                                                                .
                                                                                .
                                                                                .

                                                                                Seriously, I could fix this in two seconds with your code. that, and what browser the problem is in. specially cause you mentioned padding. they all like to handle padding differently a lot of the time.

                                                                                <div problem element>
                                                                                ::all divs inside this element::
                                                                                </div>

                                                                                then the css as well

                                                                                .problem_element{
                                                                                }
                                                                                ::all divs inside this element::

                                                                                *all elements as well, not just divs. i mean p's span's, anything with css styling


                                                                                ... Seriously, me best bet is that you have some floats somewhere which aren't being cleared.

                                                                                like;

                                                                                div <<-this
                                                                                div
                                                                                float float
                                                                                div
                                                                                div
                                                                                div
                                                                                float
                                                                                div
                                                                                div
                                                                                float float

                                                                                "this" div, won't know the end of it's content unless every one of those floats are cleared. big thing to remember is to make sure each one of your floats are cleared. guarantee that solves your problem
                                                                                Brian, hit me up on AIM sometime, fknvdscom, I wanna talk with you about some stuff. Your designs suck, but you are good with CSS, and I want an old design I made that uses tables converted to 100% CSS/Divs and I want it to be good, if the price is decent I want you to do it.

                                                                                Comment

                                                                                • Agent 488
                                                                                  Registered User
                                                                                  • Feb 2006
                                                                                  • 22511

                                                                                  #41
                                                                                  Originally posted by Killswitch
                                                                                  Your designs suck, but you are good with CSS
                                                                                  you have a way with words.

                                                                                  Comment

                                                                                  • Killswitch - BANNED FOR LIFE

                                                                                    #42
                                                                                    Originally posted by Agent 488
                                                                                    you have a way with words.
                                                                                    He knows I think his designs suck, I've been telling him it for what... 6 years or so.

                                                                                    Comment

                                                                                    • »Rob Content«
                                                                                      Confirmed User
                                                                                      • Dec 2006
                                                                                      • 4348

                                                                                      #43
                                                                                      I am jerking off right now

                                                                                      I'm on webcam

                                                                                      feel me

                                                                                      80% Revshare or 30$ PPS on $1 trials: 200 Niches = Vidz.com Galleries / FLVs / Embeds
                                                                                      3 & 5mins FLVs | RSS & Tube Feeds | Matching Thumbs | FLV Browser & Exporter | No Prechecked Xsales
                                                                                      >> Mobile Redirection Script: mobile.vidz.com also paying 80% net Lifetime << ICQ: 198-394-557


                                                                                      ICQ - 436 795 438 E-mail rob /@/ cool-content dotcom

                                                                                      Comment

                                                                                      • cyber
                                                                                        Confirmed User
                                                                                        • Jan 2004
                                                                                        • 182

                                                                                        #44
                                                                                        Originally posted by Killswitch
                                                                                        I have a div with 3 more divs inside of it, those 3 divs use absolute positioning and left attributes to put them where I want them, I then do .clearFix:after { clear: both; } and set the class of that parent div to clearFix but it's still showing the bottom of the div right up against the bottom of the 3 divs instead of the 15px padding there is supposed to be...
                                                                                        Everything you're doing is useless.

                                                                                        You don't clear absolutes. And by "left attributes" I hope you don't mean you're floating them left because that's useless, too (on absolute elements).

                                                                                        If you have it like this:

                                                                                        <div>
                                                                                        <div ABSOLUTE1></div>
                                                                                        <div ABSOLUTE2></div>
                                                                                        <div ABSOLUTE3></div>
                                                                                        </div>

                                                                                        Then set a minimum height for the container DIV. Positioning an element as absolute takes it out of the regular flow of the design, and so it doesn't really take up any space as a normal box would.

                                                                                        Comment

                                                                                        • Killswitch - BANNED FOR LIFE

                                                                                          #45
                                                                                          Juan! Send me a message on AIM, when I get back tonight I wanna talk with you.

                                                                                          fknvdscom

                                                                                          Comment

                                                                                          Working...