white-space:nowrap expands div?
<p>I made code in css for <code>div .name</code> with width of 75% so that the text truncate if doesn't fit. But when I resize my window text stays same and my whole site is falls apart.</p>

<p>This is my code: </p>

<pre><code>&lt;tr&gt;
    &lt;td class="check_td"&gt;&lt;input type="checkbox" name="products" value="&lt;?php echo $row['id']; ?&gt;"&lt;/td&gt;
    &lt;td class="product_td"&gt;
        &lt;div class="product"&gt;
            &lt;div class="thumbnail"&gt;
                &lt;img class="img" src="&lt;?php echo $row['img_path'].'/'.$row['img_name']; ?&gt;"&gt;
            &lt;/div&gt;
        &lt;div class="name"&gt;
            &lt;?php echo $row['product_name']; ?&gt; // this is problem
        &lt;/div&gt;                          
        &lt;div class="list"&gt;
            &lt;ul&gt;
                &lt;li&gt;Prodavač: &lt;a href="" style="color:black;"&gt;&lt;strong&gt;&lt;?php echo $data['username']; ?&gt;&lt;/strong&gt;&lt;/a&gt;
                (&lt;a href=""&gt;98% &lt;img src="img/stars/star.png" width="18px" style="margin-bottom:-3px;"/&gt;&lt;/a&gt;)
                &lt;/li&gt;
                &lt;li&gt;&lt;?php echo $address['city']; ?&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;/div&gt;
            &lt;div class="comm"&gt;
              &lt;img src="icons/comment.png" width="23px"/&gt;(6)
            &lt;/div&gt;
        &lt;div class="id"&gt;&lt;?php echo $row['id']; ?&gt;&lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/td&gt;
                    &lt;td class="price_td"&gt;
                        &lt;ul&gt;
                            &lt;li style="font-size:23px;"&gt;
                                &lt;strong&gt;&lt;?php echo $row['price']; ?&gt; kn&lt;/strong&gt;
                            &lt;/li&gt;
                            &lt;li&gt;
                                &lt;ul class="ship"&gt;
                                    &lt;li&gt;
                                        &lt;?php echo $row['ship']; ?&gt;
                                    &lt;/li&gt;
                                    &lt;li&gt;
                                        &lt;strong&gt;&lt;?php echo $row['ship_price']; ?&gt; kn&lt;/strong&gt;
                                    &lt;/li&gt;                                           
                                &lt;/ul&gt;
                            &lt;/li&gt;
                        &lt;/ul&gt;
                    &lt;/td&gt;
                    &lt;td class="button_td"&gt;&lt;button class="menu_buttons1"&gt;Istaknite oglas &amp;raquo;&lt;/button&gt;&lt;/td&gt;
                &lt;/tr&gt;   
</code></pre>

<p>I also noticed that width I set don't work properly when I add <code>white-space:nowrap;</code></p>

<pre><code>.name{
  display:block;
  float:left;
  margin:6px 0 10px 0;
  width:75%;
  font-size:20px;
  color:black;
  font-weight: 900;
  white-space: nowrap;
  overflow:hidden;
    text-overflow: ellipsis;
}
</code></pre>

<p>When I remove with in percents and set in pixels it works nice, but why I can't set my width of div class name in presents?</p>

<p><b>EDIT:</b>
i added jsfiddle here: <a href="https://jsfiddle.net/nwqoh931/" rel="nofollow">https://jsfiddle.net/nwqoh931/</a></p>