+ 71

Designing and Styling

Hi,for designing and styling a web page,can we use JS instead of CSS? Which one is better(for styling)? does JS take CSS place?

27th May 2019, 7:38 AM
Sheida Hedayati
Sheida Hedayati - avatar
55 Respuestas
+ 36
Yup, you can use js, but CSS is specially made for designing... And js is mainly used for animation and stuff ... js has the ability to design, because in small projects, adding a CSS file is a lot of work sometimes... But in Sololearn, using CSS is built-in with the web... And designing in js will make the code more complex to read... So prefer CSS over js for styling And besides, won't CSS be sad if js does it's work? 😉😂😂
27th May 2019, 3:48 PM
Humayra🇧🇩
Humayra🇧🇩 - avatar
+ 34
Abolfazl Naseri you mentioned a good point. thx ☺
31st May 2019, 10:15 AM
Sheida Hedayati
Sheida Hedayati - avatar
+ 27
I emphasize, just for design 😁
27th May 2019, 7:43 AM
Sheida Hedayati
Sheida Hedayati - avatar
+ 24
Well yes you can use js but I think that CSS would be better. CSS(cascading style sheets) has been made for styling . It has various instruments for creating animation , transitions and for stylings. CSS is used to make the website look more attractive , more responsive . Thanks
27th May 2019, 7:44 AM
Prince PS[Not_Active]
Prince PS[Not_Active] - avatar
+ 24
Thx all, I wanted to start learning JS and I thought it can do CSS job better, so I decided not to practice CSS anymore 😂😁, thx again for saving me from laziness😉😊
28th May 2019, 6:25 AM
Sheida Hedayati
Sheida Hedayati - avatar
+ 22
thanks all 😊
27th May 2019, 3:19 PM
Sheida Hedayati
Sheida Hedayati - avatar
+ 15
You really should use css for styling and designing all the html elements. Css can be programmed through preprocessor such as sass/scss, less too, it allows you to add repeated blocks and modules, define maxin functions, assigned variables colors and sizes into css. We only use javascript to add runtime logics on html elements.
27th May 2019, 8:13 AM
Calviղ
Calviղ - avatar
+ 15
Don't use a hammer to do the job of a spanner.
28th May 2019, 1:26 AM
Sonic
Sonic - avatar
+ 12
You can use css, css3, ZURB Foundation, Pure.CSS, Semantic UI, UIkit, Materialize, Scalable and Modular Architecture for CSS (SMACSS)
27th May 2019, 7:48 AM
MsJ
MsJ - avatar
+ 9
Why not use scss? ( js and css )
28th May 2019, 10:12 AM
Haris
Haris - avatar
+ 8
A pure Designing is a combination of HTML + CSS + JS but Mostly highly animation or Button on webpage are go through JS. You can create a Beautiful Website with HTML and CSS (For Desinging Purpose only) But for more responsive you have to choose JS.
28th May 2019, 4:29 AM
Rishabh Singh
Rishabh Singh - avatar
+ 8
No it's can't take place because CSS is foundation of styling with this every design possible but js and other have limited library's ya js might be faster but CSS always good option for pure styling
29th May 2019, 5:21 AM
vikas vareya
vikas vareya - avatar
+ 7
No. Acually JS can not replace CSS. JS has the capability of doing animations, but not in CSS. You can use jquery, which is easier than JS in handling animations.
28th May 2019, 6:44 AM
Gayani Abeykoon
Gayani Abeykoon - avatar
+ 7
CSS is better. If javascript is disabled in a browser, then your javascript won't render it.
28th May 2019, 9:15 AM
Kulisap
Kulisap - avatar
+ 6
You can!
27th May 2019, 11:39 AM
imsamaritan
imsamaritan - avatar
+ 6
Then teach us css
28th May 2019, 7:19 AM
Faiq Raza
Faiq Raza - avatar
+ 6
Js used to make the behavior of a webpage i think css is more attractive
28th May 2019, 11:21 PM
Issa Adam
Issa Adam - avatar
+ 6
No need to be ambivalent, as you've stressed "designing and beautification"...CSS is your guy. Soon enough, you'll love some interactivity on your page, that's when JS comes out handy.
29th May 2019, 2:12 AM
Fredericks
Fredericks - avatar
+ 5
You ask a good question. What I understand is that the simple answer is no. When I have used JS to stir style a page, it has typically been by adding CSS elements or even HTML attributes. JS added the functionality to my pages. I'm guessing that you wouldn't really ever see JS without CSS.
27th May 2019, 10:43 AM
mojhale
mojhale - avatar
+ 5
use CSS and keep in mind that JS ist blocked or disabled. USe JS a less as possible.
28th May 2019, 9:44 PM
Thomas Wittek
Thomas Wittek - avatar