Forum Moderators: not2easy

Message Too Old, No Replies

table's element display unstable

         

rockbk

8:12 am on May 9, 2009 (gmt 0)

10+ Year Member



Hi all . this is my code to make search form :

<style type="text/css">
.style2
{
width: 150px;
}
.style4
{
width: 144px;
}
</style>

<table style="width:588px; height:52px; background:url(http://www.example.com/background.png);">

<tr style="float:left; width:588; height:52px">
<td class="style2"> <span style="font-size:medium; float:left; padding-left:5px; font-weight: bold; font:arial; font-size:11pt">specifics
</span>
<br />
<span style="float:left; padding-left:5px;">
<asp:DropDownList runat="server" Width="140px" ID="drpMasterCategory" />
</span>
</td>
<td class="style4"> <span style="font-size:medium; font-weight: bold; float:left;font:arial; font-size:11pt">specifics:</span>
<br />
<asp:TextBox runat="server" ID="txtSearch" ValidationGroup="frist"
style="margin-left:0px; Width:140px" />

</td>

<td>
<asp:RadioButtonList runat="server" ID="radSearch" RepeatDirection="horizontal"
style="float:left; margin-left:-" />
</td>

<td>
<br />
<asp:ImageButton runat="server" style="margin-top:-10px" ImageUrl="~/Images/search_icon.png" ID="btnSearch1" OnClick="btnSearch_Click" ValidationGroup="frist" />
</td>


</tr>
<asp:RequiredFieldValidator ID="checkKeyword" ValidationGroup="frist" runat="server" ControlToValidate="txtSearch" ErrorMessage="specifics" />
</table>

Browser sometime load correct sometime wrong like it
<snip>

plz help me to fix it.
thanks all

[edited by: swa66 at 8:47 am (utc) on May 9, 2009]
[edit reason] Removed URLs and specifics please see ToS and forum charter [/edit]

g1smd

8:16 am on May 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would get rid of all inline styling and put it in an external stylesheet.

It will make it a lot easier to work on.

Also, do not use meaningless class names like style2 and style4. Name them for what they *do*.

rockbk

9:02 am on May 9, 2009 (gmt 0)

10+ Year Member



thanks g1smd for advice . but now , i would like to know why my search form un stable or how to make it stable .
this link is wrong
<snip>

[edited by: swa66 at 9:47 am (utc) on May 9, 2009]
[edit reason] No personal URLs, see ToS [webmasterworld.com] [/edit]

rockbk

10:03 am on May 9, 2009 (gmt 0)

10+ Year Member



@ swa66 : how can i attack my pic to show my problem.

SuzyUK

7:40 pm on May 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld rockbk.. btw g1smd. a code review was NOT the question?

rockbk, you can't attach a pic it's not what we do here, there's no Personal URI's at all, (imagine you were happening on this thread in 6 months time would you be happy if the answer you found relied on a dead/fixed link?) if you could post a bit of sample code (don't care whether it's valid code or not despite the previous answers) - we should be able to help

please read the sticky posts, and then be sure and tell us are you talking table code or table "display" code?