Declare a local variable at the beginning of the View:
@{
var yourStyle = "";
if(Model.Condition)
{
yourStyle = "float:left;";
//specific conditions and logic
}
else
{
yourStyle = "float:right;";
//any other conditions and logic
}
}
and then just use it in your div:
<div style="@yourStyle">