inherit
169267
0
Nov 27, 2024 14:48:29 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Jun 10, 2014 19:41:35 GMT -8
My example:$('something').css('border-radius':'10px 10px 10px 10px'); My example doesn't work any suggestions? My browser is FF.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jun 11, 2014 0:28:11 GMT -8
If they are all the same just put 10px once
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 11, 2014 0:43:56 GMT -8
When passing 2 parameters to the "css" method, you need to separate them by a comma not by a colon.
$("something").css("border-radius", "10px");
You also need to specify a border width and colour, otherwise it will appear like nothing happened.
$("something").css("border-radius", "10px"); $("something").css("border-width", "4px"); $("something").css("border-color", "#000")
You can then shorten that down by chaining...
$("something").css("border-radius", "10px").css("border-width", "4px").css("border-color", "#000");
Or you can pass an object where the key is the CSS property...
$("something").css({
"border-radius": "10px", "border-width": "4px", "border-color": "#000" });
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jun 11, 2014 1:05:40 GMT -8
I think color is optional, is it not?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 11, 2014 1:11:31 GMT -8
If no colour is specified, I think it inherits it from the parent element. Edit: Yeah it does. I wasn't 100% sure on how the inheriting works, but from what I tried, it uses the parent element text colour. Edit again: developer.mozilla.org/en-US/docs/Web/CSS/border-color
|
|
inherit
169267
0
Nov 27, 2024 14:48:29 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Jun 11, 2014 10:11:51 GMT -8
Thanks guys that's helpful If the color is not mention (like border-color: inherit or nothing) it'll take on the parent? Do I even have to include border-color:?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 11, 2014 10:32:53 GMT -8
Mike, No, you can leave it out, I included it to provide a complete example.
|
|
inherit
169267
0
Nov 27, 2024 14:48:29 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Jun 11, 2014 15:24:42 GMT -8
Peter, That didn't work ('.left-panel').css("border-radius","10px"); any other suggestions?
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jun 11, 2014 17:15:19 GMT -8
put a width as well.
|
|
inherit
169267
0
Nov 27, 2024 14:48:29 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Jun 11, 2014 17:53:11 GMT -8
Wormopolis, That didn't work either. This is what I have. $(".left-panel").css({ "border-radius": "20px", "border-width": "100px", "border-top":"2px solid #fff", "border-bottom":"2px solid #fff", "border-left":"2px solid #fff", "border-right":"2px solid #fff", }); Any more suggestions?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 12, 2014 0:29:43 GMT -8
Test it in the console when viewing this topic, works fine.
$(".message").css({ "border-radius": "20px", "border-width": "100px", "border-top":"2px solid #fff", "border-bottom":"2px solid #fff", "border-left":"2px solid #fff", "border-right":"2px solid #fff" });
|
|