On Apr 25, 7:21*pm, " Cal Who" <CalWhoNOS...@roadrunner.com> wrote:
> I want a page where there are buttons all the same size. No problem there..
>
> But I also have a type="text" with some text in front. I'd like that
> combination to be the same size as the buttons.
>
> So I put them into to a scan element and applied the same css class to the
> scan as the buttons have.
>
> That didn't work so I modified the code a little as shown below and that
> does not work either.
>
> So I put together the test sample shown below and that does not produce a
> symetriacl layout.
>
> Can you tell me how to fix this?
>
> Thanks
>
> <%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master"
> AutoEventWireup="false"
>
> CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
>
> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent"
> runat="Server">
>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>
> <style type="text/css">
>
> .Most
>
> {
>
> width: 300px;
>
> }
>
> .Combo
>
> {
>
> width: 300px !important;
>
> }
>
> </style>
>
> </asp:Content>
>
> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent"
> runat="server">
>
> <br />
>
> <input class="Most" type="button" value="test" />
>
> <input class="Most" type="button" value="test" />
>
> <br />
>
> <span class="Combo">Latitude:
>
> <input id="txtLat" type="text" value="" />
>
> </span>
>
> <input class="Most" type="button" value="test" />
>
> <br />
>
> <input class="Most" type="button" value="test" />
>
> <input class="Most" type="button" value="test" />
>
> </asp:Content>
The problem is that you decided to have <span> which does not "hold"
all space by default. Add more attributes to it's definition
for example
..Combo
{
width: 300px;
display: block;
float: left;
}
where "display block" will generate a block box
|