bravoo,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
div{
height: 10px;
background-color: #FF0000;
}
p{
background-color: #FF00FF;
height: 10px;
}
</style>
<script>
window.addEventListener('DOMContentLoaded', function() {
document.getElementsByClassName('firstclass')[0].style.width = document.getElementsByClassName('secondclass')[0].style.width;
});
</script>
</head>
<body>
<div class="firstclass" ></div>
<p></p>
<div class="secondclass" style="width: 300px"></div>
</body>
</html>