HighDots Forums  

size a inline component

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss size a inline component in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim
 
Posts: n/a

Default size a inline component - 11-05-2006 , 03:24 AM






I tried to build a "form" layout without using table like this

http://www.coolshare.com/temp/images/css.jpg

In order to get the layout, I need to set the light blue area at each
line to a fix size so that
I can align the label of each field to against the text field (kind of
center alignment) even in
case the size of text field vary. That is, with the label area (blue
area) size fixed, I can
right alight label text and left aligh the input text field.

The problem is that firefox and Opera (IE worked fine) don't allow any
inline component (either a span or
a div with display set to "inline") to have a width.

My question is:

How can I have a inline area width fixed?

thanks

mark


Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: size a inline component - 11-05-2006 , 12:12 PM






On 2006-11-05, Jim <js_ajax (AT) hotmail (DOT) com> wrote:
Quote:
I tried to build a "form" layout without using table like this

http://www.coolshare.com/temp/images/css.jpg

In order to get the layout, I need to set the light blue area at each
line to a fix size so that
I can align the label of each field to against the text field (kind of
center alignment) even in
case the size of text field vary. That is, with the label area (blue
area) size fixed, I can
right alight label text and left aligh the input text field.

The problem is that firefox and Opera (IE worked fine) don't allow any
inline component (either a span or
a div with display set to "inline") to have a width.

My question is:

How can I have a inline area width fixed?
Ideally with display: inline-block, but that's not supported by Firefox,
which leaves floats as the closest things to inline elements that can
have widths set on them.


Reply With Quote
  #3  
Old   
VK
 
Posts: n/a

Default Re: size a inline component - 11-05-2006 , 12:22 PM



Quote:
How can I have a inline area width fixed?

Ideally with display: inline-block, but that's not supported by Firefox,
which leaves floats as the closest things to inline elements that can
have widths set on them.
Firefox has -moz-inline-box display type. This display type is not
fully debugged yet, but for simple usage like here it's fine. So it
could be:

display: inline-block; /* for everyone */
display: -moz-inline-box; /* for Gecko */

I just don't see a need here for inline blocks: floating block elements
do it better and more reliably IMHO.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.