Coding css like a Monkey

I feel like a Monkey while coding CSS. I have learnt the basics of css but when I try to apply the theory, well it doesn’t work either it’s me or it’s the wacky brains at the W3 :slight_smile:

No matter what, how do I solve this problem here:

http://rebtweeter.com/

My form is sticking to the menubar. I tried to add top-margin and top-padding to the form container but that doesn’t work.

So can any more brilliant css designer help me ?

Thanks.

Adding “margin-top:100px” to your #form_container css works for me in Opera. What browsers are you looking at this in and which browser is giving you problems?

Fixes it in FF also. You also might want to fix the html and css validation errors as a future reference :wink:

Fixes it in IE also :slight_smile:

Chrome and Safari will probably be on board as well :slight_smile:

On a side note, a twitter app with no OAUTH??? Who’s really gonna enter their twitter password?

There are sites that are asking for your password and do what they want with it. On this I don’t store anything even in cookie. Now I intend to look at OAUTH … when I will have learned it :slight_smile: But foremost I’m not in a hurry the site is for a tutorial and my own use.

Well I copy and paste your code finally it works. I’m not accustomed to css syntax yet, maybe I made a mistake like forgetting to put px ?

Your mistake was to forget the whole margin-top declaration if i recall correctly :wink:

Nah, he did say he’d tried margin/padding top.

Perhaps yes you need to remember the unit of measurement , like px, % or em

Also, my code shouldn’t have worked, unless you put the semi-colon in yourself? :wink:


#form_container {
margin-top:100px;
}

Missed that.

But your code should have worked even without semi colon: the final value of the last property in your rule does not have to be closed with a semi-colon.

Unless i’m mistaken (happens a lot mind you) :smiley:

Really? That’s interesting, and I didn’t know it. I suppose good practise is to close it anyway, lest ye shall forget and 'cause big errors elsewhere. :slight_smile:

Yes you are right about the semi colon, though you should always remember to add one otherwise you will most likely forget to add one next time you need to add a property :slight_smile:

But your code should have worked even without semi colon: the final value of the last property in your rule does not have to be closed with a semi-colon.

Correct:) The last semi-colon isn’t required and I don’t usually use it in single line rules to save a few bytes.


.test{background:none}

However, when there is more than one property I usually include it as it looks neater :slight_smile:

e.g.


.test {
    background:#fff;
    color:#000;
}

I feel like a Monkey while coding CSS. I have learnt the basics of css but when I try to apply the theory, well it doesn’t work either it’s me or it’s the wacky brains at the W3

We’ve all been there :slight_smile: Keep at it, it’s not as simple as it looks.

Well, i don’t know about the rest of you but i always close them. It’s a habit and the bytes you save without them are almost 0 unless you have a huge stylesheet… Like it was mentioned, not closing those suckers could get you into trouble…