suppose I need to add following changes in my css:
.border{1px solid #cecece}
.box{float:left}
I am stucked to add these in my styles, i can only see .less files and not sure how it works.
In your custom theme , Extend your theme CSS file under Magento_Theme\web\css\source _extend.less
you need to create this less file under theme module and then you can write your new styles here or can override existing .
.border{1px solid #cecece} .box{float:left}
Try this way to add css to frontend page:
app/code/VendorName/ModuleName/view/frontend/web/css/custom.css.Create xml layout to call your css file, e.g: app/code/VendorName/ModuleName/view/frontend/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="VendorName_ModuleName::custom.css" />
</head>
</page>
Run php bin/magento setup:static-content:deploy