Bonjour,

Je cherche à faire une chose qui me parait pourtant simple : mettre sur la même ligne un label de taille fixe et un textbox dont la taille prend le reste de la ligne... Le tout sans passer par un tableau, mais avec des DIV...

Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Login.aspx.vb" Inherits="ERV.MaquetteMobile.Login" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title>Identification</title>
 
	<meta name="viewport" content="width=device-width, initial-scale=1" />
 
	<%--<link rel="stylesheet" href="/Assets/Scripts/jquery-mobile/jquery.mobile-1.0rc1.min.css" />
	<script type="text/javascript" src="/Assets/Scripts/jquery/jquery-1.6.4.min.js" ></script>
	<script type="text/javascript" src="/Assets/Scripts/jquery-mobile/jquery.mobile-1.0rc1.min.js" ></script>--%>
 
    <link rel="stylesheet" type="text/css" href="../Assets/css/ERVMobile.css" />
 
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" />
    <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
	<div data-role="page" data-title="Identification" data-theme="d">
 
    <div data-role="header" data-position="fixed">          
        <h1>Identification</h1>
	</div><!-- /header -->
 
	<div data-role="content">	
 
        <div  style="text-align:center">
            <asp:Image ID="imgLogo" runat="server" ImageUrl="~/Assets/Images/logo-cnr.jpg"  Width="120" Height="90" ImageAlign="Middle" /> 
		</div>
 
        <div data-role="fieldcontain" >
            <asp:Label runat="server" for="txtLogin" Text="Login :" style="float:left; width:125px" />
            <asp:TextBox runat="server" id="txtLogin" style="float:right; width:100%" />
		</div>
 
		<div data-role="fieldcontain">
            <asp:Label runat="server" for="txtMdp" Text="Password :" style="float:left; width:auto" />   
			<asp:TextBox runat="server" id="txtMdp"  TextMode="Password" style="float:right; width:auto" />
		</div>
 
        <div data-role="fieldcontain">
 	        <fieldset data-role="controlgroup">
                <asp:CheckBox runat="server" id="cbConnexion" class="custom"  style="float:right"   />
		        <label for="cbConnexion">Connexion automatique</label>
            </fieldset>
        </div>
 
        <table width="100%" border="0">
            <tr>
                <td  >
                 <asp:Label ID="df" runat="server" for="TextBox1" Text="Mot de passe password :" style="float:left; width:200px" />
                 </td>
                <td width="100%"><asp:TextBox runat="server" id="TextBox1"  TextMode="Password" style="width:98%; "/></td>
            </tr>
        </table>
 
	</div><!-- /content -->
 
 
 
	<div data-role="footer" data-position="fixed" style="text-align:center">
		<asp:Literal ID="Literal1" runat="server" Text="Copyright © C.N.R. 2011" />
	</div><!-- /footer -->
    </div><!-- /page -->
    </form>
</body>
</html>
Comme on le voit, ça fonctionne parfaitement avec un tableau... Avec un DIV, la textbox prend toute la ligne...

Merci pour votre aide