September 6, 201016 yr Hi Guys I can't figure out why my code for rounded corners around a div is not working !! Here is the CSS code: #bottomBox { border-width: 1px; -moz-border-radius: 15px; border-radius: 15px; border-color: #b0b0b0; } And here is the HTML code: <div id="bottomBox"> <h2>Lorem ipsum</h2> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div><!-- End of Bottom Box --> I would greatly appreciate any help. I'm checking it in Chrome by the way. Thank you.
September 6, 201016 yr I'm checking it in Chrome by the way That's your problem. Your code is specific for Mozilla browsers only i.e. Firefox. To use this properly you should do the following: -moz-border-radius: 15px; -webkit-border-radius: 15px; border-radius: 15px; Chrome is a webkit browser, so the '-webkit' part will make it work in Chrome. The last line of code future-proofs it so when CSS3 is officially released this will override any vendor properties.
September 6, 201016 yr Author Hi MrChristoph Thanks for that. However it still did not work. Still I get no border, not even straight ones, never mind rounded ones EDIT: Are there things that I need to write at the start of a CSS3 file, to tell the browser that it is in fact a CSS3 ?
September 6, 201016 yr #bottomBox { border: 1px solid #b0b0b0; -moz-border-radius: 15px; -webkit-border-radius: 15px; border-radius: 15px; } If this code doesn't work are you sure your CSS is linked properly?
September 6, 201016 yr Author Yeah the CSS file is linked properly since all the other css code is working fine !! EDIT: I have just uploaded the files to my server, so that I can make the " helping " process easier for us all. The Website I am confused.
September 6, 201016 yr Do you have a link? What CSS code shows in Firebug when you select the div? The above code really should work unless I've gone mental.
September 6, 201016 yr Do you have a link? What CSS code shows in Firebug when you select the div? The above code really should work unless I've gone mental. nope, your not going mental, it works
September 6, 201016 yr nope, your not going mental, it works phew! Maybe some CSS code above the part for the div is missing a ";". I know thats happened to me before!
September 6, 201016 yr Well it works for me when I change the code as I posted above just fine. I think you need to put the border before the border-radius.
September 6, 201016 yr Author Thank You So Much It worked. I had forgotten the { Solid } bit to the border. That is why I was not getting anything. Thanks for the help guys, really appreciate it.
September 11, 201016 yr will be nice when it does get standardised and we don't have to use three properties for the cool stuff when is it due, does anyone know?
Create an account or sign in to comment