Gradients And Round Corners

Jul 23, 2005

I haven't found in my CSS book how to create a gradient to fill a division
tag, and to create a border with round corners.

Is it possible using either CSS or JavaScript? I'd like to create a menu bar with a gradient in the background, and I want the top corners to be a little round with a 5px radius.

View 3 Replies


ADVERTISEMENT

Object Oriented Programming - Make A Round Corners Script

Feb 15, 2012

I am trying to make a round corners script in object oriented programming method. This is purely for learning purposes.

The script is no where near complete but I am already having problems with it.

I am trying out the techniques described in 'David Flanagan ' text book 'JavaScript: The Definitive Guide, 5th Edition'

This code is called from html page which once working will place a round container around element

The selector parameter in Custom_rounded_container function is defined because only the else part of the if statement in Custom_rounded_container is executing. I put this in because few people at other forums thought the problem was because of the selector parameter being undefined.

External Javascript file

View 1 Replies View Related

Round Corners Script In Object Oriented Programming Method

Feb 12, 2012

I am trying to make a round corners script in object oriented programming method. This is purely for learning purposes.

The script is no where near complete but I am already having problems with it.

I am trying out the techniques described in 'David Flanagan ' text book 'JavaScript: The Definitive Guide, 5th Edition'

This code is called from html page which once working will place a round container around element

Code:

Javascript functions below

Code:

View 19 Replies View Related

Using Curvy Corners JS For Rounded Corners In IE?

Aug 3, 2011

I am using the curvycorners.src.js script in order to achieve rounded corners in IE. If you go here: [URL] and then drag and resize your browser screen, you will see that the header and bottom section move out of alignment. When I remove the Curvy Corners script, the issue goes away. For some reason though it is only affecting the home-page of the site (not the sub-pages).

View 1 Replies View Related

JQuery :: Using Corners Plugin With Ie6 >?

Nov 15, 2010

I'm trying to get borders to display properly with this plugin:On the page it says to use the keep option, but it does not give an option to specify what colour the border should be , if I specify the type of border in a stylesheet: like (border:1px solid #d4d4d4;) it shows the border great in firefox, but in ie6 and 8 it shows the border but not to the contours of the rounded box (ie square)

View 3 Replies View Related

Curvy Corners Not Rendering?

Oct 28, 2009

I've downloaded the curvy corners codes from the following address: http:[url]....

The instructions in the curvycorners.src.js file say that all i need to do is add the following piece of code which I've inserted into the head section:

<script type="text/javaScript" src="js/curvycorners.src.js"></script>
<style type="text/css">
<!--[code].....

View 5 Replies View Related

How To Make Rounded Corners

Feb 7, 2010

I am no expert in javascript. In fact I tend to use just open source when i use it at all but I believe there is a javacript script fro creating rounded corners for boxes? my question is: will this size to the size of someones monitor or viewport?The one i have found is as below. Can anyone tell me whether this script would. If not are there any orthers that do out there?

HTML Code:

function NiftyCheck() {
if(!document.getElementById || !document.createElement) {
return false;

[code]....

View 2 Replies View Related

JQuery :: Using Malsup's Rounded Corners In IE7?

Jun 26, 2011

I am using Malsup's Rounded Corners plugin, which is amazing! I use Chrome and Firefox so it looks great. However mycolleague using IE, complained that the corners aren't round. So I looked and the corners are but the border is not (using the "keep" setting).

I saw that on ff/chrome you are using the border-radius which isn't supported by IE<9. Is there some other way to get the borders looking round on IE7,8 or do I just have to turn off the borders?

View 2 Replies View Related

Using Curvy Corners - Unable To Add A Second <div Id> To The Script?

Nov 26, 2010

I am using curvy corners, and it is working fine, as long as I only want one rounded box...I want (at least) two, and I am having trouble adding a second <div id> to the script.I'm not able to decipher much of javascript, and the explanation that came with the code isn't clear enough for me.Here's the code...

<script type="text/JavaScript">
window.onload = function() {
var settings = {[code].....

View 2 Replies View Related

Html TextBox Rounded Corners?

Jul 22, 2010

So, I wish make html input type text with rounded corners. I want make this with on JS.

View 1 Replies View Related

JQuery :: Rounded Corners And Drop Shadows

Jan 16, 2011

I'm looking for a jQuery plugin or pair of plugins that will apply both a rounded corner and a drop shadow to a DIV box without the use of corner/border images. I've actually found quite a few that do one or the other but they seem to be pretty outdated, not in itself a problem but mostly for lack of support. So far, the few that I've found will do rounded corners and a few will do drop shadows. Sometimes they fail to work with each other and sometimes they only work in FF or Safari and fail in IE. I'm coming up short on the magic combination.

This failure in IE kinda defeats the whole purpose of doing this with jQuery since I can already get FF and Safari do to both with only CSS3. Does anyone know of a great jQuery plugin or pair of plugins known to work in all browsers including the latest couple/few versions of IE?

View 2 Replies View Related

Method (apart From CSS3) To Create Rounded Corners?

Jul 16, 2011

I know CSS3 is at the stage now where we can use this feature comfortably across all modern browsers, but what else can be done via Javascript/Jquery to create our ever-so beautiful rounded corners ? Im trying to achieve a fairly consistent look "cosmetically" in all my sites going back as far as IE 7...For example my second site Ive built PAT Tester providing PAT Testing in Birmingham Worcester Bromsgrove Redditch Dudley Worcestershire West Midlands utilises CSS3 and looks ok in the modern browsers, but go back to IE8 and "yuck" its all squared out maaaan....!

View 1 Replies View Related

JQuery :: Adding Curvy Corners To Multiple DIVs?

Aug 14, 2010

I have the following to add curvy corners to my divs;
<script type="text/javascript">
$(document).ready(function(){
$('#album').corner();
});
</script>

My divs look like:
<div
id
="album"
> ... something here ... </div
>
<div
id
="album"
> ... somthing here ... </div
>
<div
id
="album"
> ... somthing here ... </div
>
<div
id
="album"
> ... somthing here ... </div
>
The curvy corners only works on the first div. How to make it work on all album divs ?

View 1 Replies View Related

JQuery :: Malsup Corners - Strange Top Nudges In IE6 And Opera

Sep 21, 2009

I am playing with malsup's corners and I am getting strange nudges on both top corners in Opera, IE6 and Konquerer when applied to nested elements (to achieve a cornered border). I am using exactly the same code as on the demo page: "$(this).corner("round 8px").parent().css ('padding', '4px').corner("round 10px")". Strangely this only appears when the radius is more than 10px and
div.outer's padding is less than 3px. All corners are rounded, just at the top div.outer still seems to have little develish horns.

View 2 Replies View Related

Call Script Event On HTML Div Border Corners?

Jun 19, 2011

It sounds confusing, but is quite simple. I have a square div, and using css I have four circles replacing the corners of the of the divs border. I want the user to be able to click on one of the corner circles changing the curser image and calling the Javascript onclick event. How do I did that?

View 6 Replies View Related

Round Down To Nearest .25 ?

Aug 13, 2010

I need to round down to the nearest quarter hour (or .25 in decimal) via Javascript and have not come across any appropriate code yet.

View 4 Replies View Related

JQuery :: Corners In IE6 - Error That Is Produced At The Bottom Of The Article Corner?

Dec 17, 2010

this jQuery plugin nearly works in IE6. You can see the error that is produced at the bottom of the article corner. (I'm tackling the other issues... .png later) http:[url].....

View 2 Replies View Related

JQuery :: How To Round Up To 2 Decimals

Apr 27, 2009

I can'nt ffigure out how to round up the result of division 10/3 for example and to show only 3.33 as result

View 2 Replies View Related

Round Off This Calc To 2 Decimals?

Jan 3, 2010

First time user of Javascript and built an online calculator, trouble is I dont know where or how to code it so the answer ends with only 2 decimals

I have embedded code, Personally I think it's a miracle the darn thing works.:thumbsup: Link to page it's on [URL]...I have searched and read but after hours of trying stuff gave up.

<!--
function treevalue() {
document.volume.result.value=(((3.14159*((document.volume.radius.value)*(document.volume.radius.valu e)))*(document.volume.height.value))/3)*(document.volume.base.value)*(document.volume.e.value)*(document.volume.fv.value)*(document.volum e.l.value);

[Code]...

View 9 Replies View Related

Still Can't Fix Math.round / Make It Possible?

Nov 8, 2011

Just started to learn java & came up with the following, but can't get the math.round to work. Anyone able to tell me where I'm going wrong please ? code...

View 9 Replies View Related

Round Off A Number Function

Jul 22, 2002

To round off a value to a specified number of digits:

function RoundIt(Value,Digits) {
&nbsp;var P=Math.pow(10,Digits);
&nbsp;var R=Math.round(Value*P)/P;
&nbsp;var G=true;
&nbsp;while(G) {
&nbsp;&nbsp;R=String(R);
&nbsp;&nbsp;var L=R.length;
&nbsp;&nbsp;var I=R.indexOf('.');
&nbsp;&nbsp;if (I == -1) {
&nbsp;&nbsp;&nbsp;R=R+'.'
&nbsp;&nbsp;} else {
&nbsp;&nbsp;&nbsp;var D=L-I-1;
&nbsp;&nbsp;&nbsp;if (D < Digits) {
&nbsp;&nbsp;&nbsp;&nbsp;R=R+&#390;'
&nbsp;&nbsp;&nbsp;} else {
&nbsp;&nbsp;&nbsp;&nbsp;G=false;
&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;}
&nbsp;return R;
}

View 2 Replies View Related

Imitate PHP Round Function In JS?

Jun 22, 2011

When rounding these 2 numbers in PHP and JS i get the following results:

22.044960000000003

PHP = 22.04
JS = 22.05 [code].....
}
I have tried many functions but cant seem to produce the same result as the PHP round. Does anyone have a solution to how can i get the same result using JS?

View 14 Replies View Related

Round Up 2 Decimal Places

Nov 17, 2011

I am trying to use the following javascript [URL] to create something similar to the example on [URL] for a school project but I wondered if someone could advise me how I can round numbers to 2 decimal places in the field box as I have to convert the calculated value by an exchange rate, e.g.:

where x=100 and y=50
calculate="(x+y)/1.55"

returns a value of 96.77419355. I would like to round this figure up to 2 decimal places so it would read 96.77 but I cannot figure out how to do this.

View 6 Replies View Related

JQuery :: Event-Bubbling The Other Way Round?

Apr 30, 2009

Ive written this source

[Code]...

View 7 Replies View Related

Round Off Decimal Point Error?

Nov 18, 2009

I use the following to round off to two decimal point.It works fine

function roundNumber(rnum, rlength) {
var newnumber = Math.round(rnum*Math.pow(10,rlength))/Math.pow(10,rlength);
return newnumber;
}

[Code]....

how to get two decimal place instead of 1?

View 3 Replies View Related

Round Number (Value) To 2 Decimal Points

Dec 6, 2010

I have this js function:
<script type="text/javascript">
function updatesum() {
document.PaymentForm.newbalance.value = (document.PaymentForm.balance.value -0) - (document.PaymentForm.paymentamount.value -0);
}
</script>
I want to round the value of document.PaymentForm.newbalance.value to two decimal points.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved