Skip to main content
December 15, 2009
Answered

jQuery rounded corners dont seem to work

  • December 15, 2009
  • 1 reply
  • 487 views

This is my first time using jQuery.

Here is my link http://www.allthingsprintuk.co.uk/sidebartest.html

I am trying to achieve rounded corners on my sidebarcontainer (that houses my sidebarcontent list & my main image (the Boat)) using jQuery.

Not sure what I have done to my code to not make it work. Any Ideas?

Thanks in advance.

This topic has been closed for replies.
Correct answer David_Powers

You have embedded your script blocks inside a style block:

<style type="text/css">

body {
     background-color: #F7A700;
}
-->

<script src="jquery-1.3.2.min.js" type="text/javascript" charset"utf-8"></script>
<script src="jquery.curvycorners.min.js" type="text/javascript" charset"utf-8"></script>

<script type="text/javascript">
$(document).ready(function(){
$('.sidebarcontainer').css({background: '#3f3f3f'}).corner('round 8px')
});
</script>

</style>

It should look like this:

<style type="text/css">

body {
     background-color: #F7A700;
}
</style>

<script src="jquery-1.3.2.min.js" type="text/javascript" charset"utf-8"></script>
<script src="jquery.curvycorners.min.js" type="text/javascript" charset"utf-8"></script>

<script type="text/javascript">
$(document).ready(function(){
$('.sidebarcontainer').css({background: '#3f3f3f'}).corner('round 8px')
});
</script>

1 reply

David_Powers
David_PowersCorrect answer
Inspiring
December 16, 2009

You have embedded your script blocks inside a style block:

<style type="text/css">

body {
     background-color: #F7A700;
}
-->

<script src="jquery-1.3.2.min.js" type="text/javascript" charset"utf-8"></script>
<script src="jquery.curvycorners.min.js" type="text/javascript" charset"utf-8"></script>

<script type="text/javascript">
$(document).ready(function(){
$('.sidebarcontainer').css({background: '#3f3f3f'}).corner('round 8px')
});
</script>

</style>

It should look like this:

<style type="text/css">

body {
     background-color: #F7A700;
}
</style>

<script src="jquery-1.3.2.min.js" type="text/javascript" charset"utf-8"></script>
<script src="jquery.curvycorners.min.js" type="text/javascript" charset"utf-8"></script>

<script type="text/javascript">
$(document).ready(function(){
$('.sidebarcontainer').css({background: '#3f3f3f'}).corner('round 8px')
});
</script>
December 16, 2009

Thank you David, that was the problem. Appreciated.