Thanks... I was just playing with float but I set the input to
float:left and the span to float:right thinking it was something to do
with justification. I kind of got it working but it didn't look right
in Chrome. Perhaps your way works better but I'll sack it off if it's
bad coding... Thanks though.

Here's the big picture:

I have a grid of input fields...

When I click into an input field I want to display a little side bar
that has an expand 'button'.

When the expand button is clicked, I want to collapse the input field
and/ or show a panel of buttons which when clicked do various things
that give the feel that the operations are bound to the input field
clicked.

I am going down the road at the moment of hiding the input screen and
showing the button panel in it's place but I'm open to interface
suggestions... I quite ilke the way Google Calender shows an
interactive tooltip/ popup when clicking into a Day to create an
event.

Just though - If I use an image for the expand button, I guess the
width issue of the SPAN goes out the window because the image is a
fixed width anyway and so it will be whatever width I make it.

I like what Hector has provided, that has given me an insight for
other  bits I'm working on.


Cheers guys...



On Nov 7, 4:27 pm, mbraybrook <[EMAIL PROTECTED]> wrote:
> This works:
>  <input type="text" style="float:left;"/><span style="width:80px;
> background-color:#00FF00;display:block;float:left;">A</span>
>
> However...
> I feel bad telling you that - this is bad markup - perhaps you could
> explain why you are trying to do this, or what the bigger picture here
> is?
>
> As stated by Andy, setting span, an inline element, to display:block,
> defeats the object of using a span tag at all.
>
> M
>
> On Nov 7, 4:04 pm, nmiddleweek <[EMAIL PROTECTED]> wrote:
>
> > Yes that works...
>
> > What I'm trying to do is display a SPAN atg at the end of an Input
> > text field of a fixed size. If I set the display to block, it is
> > forcing itself to be on the next line.
>
> > Have you got any idea on how I can do this?
>
> > Cheers,
> > Nick
>
> > On Nov 7, 3:48 pm, mbraybrook <[EMAIL PROTECTED]> wrote:
>
> > > try:
> > > <span style="width:80px; background-color:#00FF00; display:block;">A</
> > > span>
>
> > > Does that work?
>
> > > M
>
> > > On Nov 7, 3:45 pm, nmiddleweek <[EMAIL PROTECTED]> wrote:
>
> > > > Hello,
>
> > > > I've got a SPAN tag which is set to 80px...
>
> > > > <span style="width:80px; background-color:#00FF00;">A</span>
>
> > > > The contents of the SPAN is a single character and when rendered on
> > > > screen, the green SPAN is showing as only approx 15 pixels in width.
>
> > > > How can I force the width to be 80px?
>
> > > > Thanks,
> > > > Nick

Reply via email to