Note that there are some explanatory texts on larger screens.

plurals
  1. POTD width is not working in safari browser
    primarykey
    data
    text
    <p>I am rendering button in ASP.Net using the below HTML code </p> <pre><code>&lt;table onclick="" title="Add New" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; float: left; cursor: pointer; "&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="ButtonLeftStyle"&gt; &lt;/td&gt; &lt;td class="ButtonCenterStyle" &gt; &lt;span class="ButtonTextStyle"&gt;Add New&lt;/span&gt; &lt;/td&gt; &lt;td class="ButtonRightStyle"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <hr> <p>I am using below CSS classes to this button</p> <pre><code>.ButtonLeftStyle { width: 1px; } .ButtonRightStyle { width: 1px; } .ButtonCenterStyle { background:url(Images/imgButton/GenericButton_Link.gif) repeat 0 -1px transparent; width: 120px; border: 1px solid #77A2B5; border-collapse: collapse; color: #000000; display: inline; font-family: Tahoma,Arial,Verdana,Sans-Serif; font-size: 11px; line-height: 13px; text-align: left; text-decoration: none; vertical-align: middle; white-space: nowrap; cursor: hand; text-indent:25px; height: 18px; } TD.ButtonCenterStyle:hover { background:url(Images/imgButton/GenericButton_Hover.gif) repeat 0 -1px transparent; width: 120px; border:1px solid #cccccc; border-collapse: collapse; color: #666666; display: block; font-family: Tahoma,Arial,Verdana,Sans-Serif; font-size: 11px; line-height: 13px; text-align: left; text-decoration: none; vertical-align: middle; white-space: nowrap; cursor: hand; text-indent:25px; height: 18px; } .ButtonTextStyle { font-size: 10px; font-family: Tahoma,Arial,Verdana,Sans-Serif; } </code></pre> <p>If we calculate the width of table then it must come 124px which coming correct in IE8, 9, and Firefox, but failing in Safari. Safari renders button with width = 46px which is equal to the text inside span. </p> <p>How do I fix this problem?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload