[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-09 Thread nmiddleweek
Thanks for your help with all this, I went with Hectors solution in the end. Here's the demo concept: http://www.getdiverted.com/test/test.html Cheers guys! On Nov 9, 9:36 am, mbraybrook <[EMAIL PROTECTED]> wrote: > It is not a good idea, in my experience, to use floats in that way, > but if

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-09 Thread mbraybrook
It is not a good idea, in my experience, to use floats in that way, but if it works - consistently - then i guess there is no real reason not to, it just doesn't feel right... I would avoid going down the road of using inline-block, IE will not completely support it until IE8 is released, and Fir

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread nmiddleweek
Why is this bad markup? it works... On Nov 7, 4:27 pm, mbraybrook <[EMAIL PROTECTED]> wrote: > This works: >  A > > 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 A

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread nmiddleweek
uot;width: > >> 80px;background: #ff; border: 0px;height: 20px;" /> > > >> -----Original Message- > >> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] > >> On Behalf Of Hector Virgen > >> Sent: Friday, November 07, 2008 10:30 AM

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Liam Potter
ps.com [mailto:[EMAIL PROTECTED] On Behalf Of Liam Potter Sent: Friday, November 07, 2008 11:08 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? the most simple way to do this, is to simply apply display:block on the s

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread nmiddleweek
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 tho

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Liam Potter
, November 07, 2008 11:08 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? the most simple way to do this, is to simply apply display:block on the span. A that will fix it all. Andy Matthews wrote: That's a L

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Andy Matthews
@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? the most simple way to do this, is to simply apply display:block on the span. A that will fix it all. Andy Matthews wrote: > That's a LOT of markup. > > You could actually use an

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Liam Potter
ginal Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Hector Virgen Sent: Friday, November 07, 2008 10:30 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? Wrap the input in a div with and se

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Andy Matthews
2008 10:30 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: span tag is width:80px but is only showing the width of contents? Wrap the input in a div with and set the div's position to relative. Then, add the span as as a div, set the width, and position it absolutely. Its absolute pos

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Hector Virgen
Wrap the input in a div with and set the div's position to relative. Then, add the span as as a div, set the width, and position it absolutely. Its absolute position will be relative to the container div, not the page. test -Hector On Fri, Nov 7, 2008 at 8:04 AM, nmiddleweek <[EMAI

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread mbraybrook
This works: A 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 No

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread nmiddleweek
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 PROTECTE

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread nmiddleweek
Ah right, ok... Cheers for the replies... I'm guessing applying display:block is the same as just making it a DIV? On Nov 7, 3:48 pm, "Andy Matthews" <[EMAIL PROTECTED]> wrote: > Span is an inline element and cannot have a width applied to it, unless you > display it as a block, which would

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread Andy Matthews
Span is an inline element and cannot have a width applied to it, unless you display it as a block, which would sort of defeat the purpose of having it inline. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nmiddleweek Sent: Friday, November 07,

[jQuery] Re: span tag is width:80px but is only showing the width of contents?

2008-11-07 Thread mbraybrook
try: A 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... > > A > > 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. > > Ho