Am I a retard for not being able to figure out .css?

rusvik

New member
Jan 21, 2011
2,404
29
0
Srs question is srs.

I hate css like ebola. I am ten times more comfortable writing stuff in Python, using databases, than using css.

Making a couple of divs line up and not fuck up when you put stuff in them is an absolute study in futility.

Can't stand it seriously and have to outsource almost every little thing.
 


The problem with CSS is that it seems easy, but it's so damn hard, especially when it comes to positioning. Unless you are willing to understand very core concepts such as how browsers read the code, understand why clearfix exist and similar things, you'll have a hard time.

CSS also requires planning before diving into code, 1px solid border can fuck up your entire layout.

Tuts+, Code academy and similar tutorial websites provide very basic things.
Get a Lynda membership and take some courses. They really take you through important details that you need to know.

Trust me, if CSS gives you a hard time it's because you don't understand it well enough. My mind was blown when I saw how simple things such as "height:100%", floats on "display:block" or "display:inline" behave differently.

post-18529-Yes-mlkshk-1nAi.gif
 
Need help floating my 1 Adsense block bro.
Floating how? Highly recommend chrome dev tools to follow the flow of your containers, maybe it's in a container thats on the left only, for example, so when you float:right it only foes to the right of that container and not the body.
 
I would recommend box-sizing border-box if borders throw off your layout. It is one of the few things IE got right.
 
My mind was blown when I saw how simple things such as "height:100%", floats on "display:block" or "display:inline" behave differently. [/img]

Part of the reason your mind was blown might have been because there is no such thing as an inline float. Floating anything turns it into a block, regardless of being set to display: inline; or not. :yin-yang:
 
The problem with CSS is that it seems easy, but it's so damn hard, especially when it comes to positioning. Unless you are willing to understand very core concepts such as how browsers read the code, understand why clearfix exist and similar things, you'll have a hard time.

CSS also requires planning before diving into code, 1px solid border can fuck up your entire layout.

Tuts+, Code academy and similar tutorial websites provide very basic things.
Get a Lynda membership and take some courses. They really take you through important details that you need to know.

Trust me, if CSS gives you a hard time it's because you don't understand it well enough. My mind was blown when I saw how simple things such as "height:100%", floats on "display:block" or "display:inline" behave differently.

post-18529-Yes-mlkshk-1nAi.gif

Hmm I seen that on Lynda and was like "I already know CSS, how much could I learn?" Well, I'll give it a shot now. thanks.
 
Bootstrap is the shit. I start all my projects with it and a few other bits, some stuff from HTML5 Boilerplate and some jQuery, that I always use. Over the years I had been building my own framework and struggling with some common user interface components, but Bootstrap has everything I need and it just works.

Once you've got your project built, you can generate a custom version of Bootstrap with just the components you're using, to get rid of some of the bloat. If you don't want to use Bootstrap, at least look into normalize.css necolas/normalize.css

And as Disaffected said, adding...

Code:
* {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

to your css will save you a lot of headaches.
 
When I started to learn html/css. I approached it as if I was supposed to build something with lego. Eventually I created my own framework, then I adjusted to everything else.

You can also learn with modifying frameworks but as Fatbat said bloat will eventually the biggest problem.
 
Bootstrap, Foundation, Kube, are all good starting points. Kube is a little more bare than the other two.

Less and Sass are nice too. I haven't messed with Sass much, but its probably not too different from Less, and its nice being able to organize things across multiple files rather than having a big mess in one file. Especially with something as finicky as css.
 
I would try to learn CSS before you strap a crutch on. Bootstrap is a framework. Sure it can help you follow some best practices, but you still need some CSS.

Use a programing text editor, and your browsers and play with it. There is a newer (couple years old) called brackets which will give you a live load into your browser which is helpful.


Last but not least. Stay far far away from visual designers like dreamweaver (unless you are using source view).
 
When Bootstrap came out it was exactly what I'd been wanting for a long time. I started programming before there was a web, and when I first saw HTML/CSS in school I was like wtf is this?! I've never wanted to learn stupid arbitrary stuff about how different web browsers work and I always figured it was a waste of time. Now, thanks to Boostrap, I can spend more time on actual programming and spend way less time bashing my head against the wall trying to get some fucking DOM elements to line up.

I've always wondered about web designers who take pride in knowing different browser quirks and CSS intricacies... y no self-respect?