How can I add a vertical scrollbar to my div automatically?

You need to assign some height to make the overflow: auto; property work. For testing purpose, add height: 100px; and check. and also it will be better if you give overflow-y:auto; instead of overflow: auto;, because this makes the element to scroll only vertical but not horizontal. float:left; width:1000px; overflow-y: auto; height: 100px; If you … Read more

text flowing out of div

It’s due to the fact that you have one long word without spaces. You can use the word-wrap property to cause the text to break: #w74 { word-wrap: break-word; } It has fairly good browser support, too. See documentation about it here.

How do negative margins in CSS work and why is (margin-top:-5 != margin-bottom:5)?

Negative margins are valid in css and understanding their (compliant) behaviour is mainly based on the box model and margin collapsing. While certain scenarios are more complex, a lot of common mistakes can be avoided after studying the spec. For instance, rendering of your sample code is guided by the css spec as described in … Read more

CSS @font-face – what does “src: local(‘☺’)” mean?

if you read the notes in font-squirrel’s font-face generator, you’ll see that it was a gotcha by paul irish. Here is the excerpt from his blog post: And.. regarding @font-face syntax I now recommend the bulletproof smiley variation over the original bulletproof syntax. @font-face { font-family: ‘Graublau Web’; src: url(‘GraublauWeb.eot’); src: local(‘☺’), url(‘GraublauWeb.woff’) format(‘woff’), url(‘GraublauWeb.ttf’) … Read more

How can I override inline styles with external CSS?

The only way to override inline style is by using !important keyword beside the CSS rule. The following is an example of it. div { color: blue !important; /* Adding !important will give this rule more precedence over inline style */ } <div style=”font-size: 18px; color: red;”> Hello, World. How can I change this to … Read more

Fade Effect on Link Hover?

Nowadays people are just using CSS3 transitions because it’s a lot easier than messing with JS, browser support is reasonably good and it’s merely cosmetic so it doesn’t matter if it doesn’t work. Something like this gets the job done: a { color:blue; /* First we need to help some browsers along for this to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)