Reputation: 5
I'm working in a SaaS program that allows you to enter a custom CSS file with some html as well. That means I can't remove anything from their code, just override it. I've found an element.style in their code but I can't tell how to override it because I can't find a div or class that it goes with. The line in question is <div style="margin:5px; width:140px; height:20px; float:right;" align="right">
. I want to change width: 140px
to 200px
<div class="boxcontent">
<div style="width:100%; height:42px;">
<div style="margin:5px; width:400px; height:30px; float:left;">
<div class="dashboard_dropdown_btn" id="metric_drop_0">
<div class="color_image">
</div>
<div class="text">
<span id="metric_type_0">Ideas</span>
</div>
</div>
<div class="dashboard_dropdown_btn" id="metric_drop_1" style=
"display:none; margin-left:5px;">
<div class="color_image">
</div>
<div class="text">
<span id="metric_type_1">Ideas</span>
</div>
</div>
<div class="dashboard_dropdown_btn" id="metric_drop_2" style=
"display:none; margin-left:5px;">
<div class="color_image">
</div>
<div class="text">
<span id="metric_type_2">Ideas</span>
</div>
</div>
<div class="dashboard_edit_div">
<a href="javascript:void(0);" id="dashboard_edit_btn">Edit</a>
</div>
</div>
<div style="margin:5px; width:140px; height:20px; float:right;" align="right">
<div style="float:left; margin-right:5px; line-height:20px;">
View by:
</div>
<div onclick="selectView('d');" class="select_icon" id="select_day" style=
"float:left;" rel="on" title="Day"></div>
<div onclick="selectView('w');" class="select_icon" id="select_week" style=
"float:left;" title="Week"></div>
<div onclick="selectView('m');" class="select_icon" id="select_month" style=
"float:left;" title="Month"></div>
</div>
Upvotes: 0
Views: 49
Reputation: 875
.boxcontent>div>div:nth-child(2) {
background-color: red;
width: 200px !important;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="boxcontent">
<div style="width:100%; height:42px;">
<div style="margin:5px; width:400px; height:30px; float:left;">
<div class="dashboard_dropdown_btn" id="metric_drop_0">
<div class="color_image">
</div>
<div class="text">
<span id="metric_type_0">Ideas</span>
</div>
</div>
<div class="dashboard_dropdown_btn" id="metric_drop_1" style="display:none; margin-left:5px;">
<div class="color_image">
</div>
<div class="text">
<span id="metric_type_1">Ideas</span>
</div>
</div>
<div class="dashboard_dropdown_btn" id="metric_drop_2" style="display:none; margin-left:5px;">
<div class="color_image">
</div>
<div class="text">
<span id="metric_type_2">Ideas</span>
</div>
</div>
<div class="dashboard_edit_div">
<a href="javascript:void(0);" id="dashboard_edit_btn">Edit</a>
</div>
</div>
<div style="margin:5px; width:140px; height:20px; float:right;" align="right">
<div style="float:left; margin-right:5px; line-height:20px;">
View by:
</div>
<div onclick="selectView('d');" class="select_icon" id="select_day" style="float:left;" rel="on" title="Day"></div>
<div onclick="selectView('w');" class="select_icon" id="select_week" style="float:left;" title="Week"></div>
<div onclick="selectView('m');" class="select_icon" id="select_month" style="float:left;" title="Month"></div>
</div>
</div>
</div>
Upvotes: 1