How do I center this form in css?
Another way
Another way
top and left correspond to the top-left corner of your box. What you’re trying to do is have them correspond to the center. So if you set margin-top and margin-left to negative of one-half the height and width respectively, you’ll get a centered box. Example for a 300×200 box:
Inline elements: respect left & right margins and padding, but not top & bottom cannot have a width and height set allow other elements to sit to their left and right. see very important side notes on this here. Block elements: respect all of those force a line break after the block element acquires full-width if width not defined … Read more
I’ve found the best method is to write your default CSS for the older browsers, as older browsers (including IE 5.5, 6, 7 and 8) can’t read @media. When I use @media, I use it like this: But you can do whatever you like with your @media. This is just an example of what I’ve found best for … Read more
We have a WordPress sidebar designed like this: Note the grey border of the large white div is offset up and left (ignore the same effect on the image inside the white div please) – we want the border offset in our final design. I’ve tried building this with HTML: and CSS: However, on the live page the … Read more
I was able to make the navigation bar transparent by adding a new .transparent class to the .navbar and setting the CSS like this: My markup is like this
Use max-height in the transition and not height. And set a value on max-height to something bigger than your box will ever get. See JSFiddle demo provided by Chris Jordan in another answer here.
jsFiddle.
change to Because background is a shorthand property for background-color background-image background-position background-repeat background-attachment
You need to use the CSS3 transform property rotate – see here for which browsers support it and the prefix you need to use. One example for webkit browsers is -webkit-transform: rotate(-90deg); Edit: The question was changed substantially so I have added a demo that works in Chrome/Safari (as I only included the -webkit- CSS prefixed rules). The problem you have is that you do not … Read more