HighDots Forums  

alignment using CSS

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


Discuss alignment using CSS in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ashkaan57@hotmail.com
 
Posts: n/a

Default alignment using CSS - 02-26-2008 , 06:05 PM






Hi,
I am trying to align a couple of rows of data/label using CSS and am
failing. I tried to use span with width but soon realized can't assign
width to inline elements.
I am trying to do something like:

label1 (100px;left-margin:10px) value 1 (200px) label2
(100px) value2 (200px, right margin:10px)

Repeat the above so that all labels and values line up.

Thanks.

Reply With Quote
  #2  
Old   
Bergamot
 
Posts: n/a

Default Re: alignment using CSS - 02-26-2008 , 06:10 PM






ashkaan57 (AT) hotmail (DOT) com wrote:
Quote:
I am trying to do something like:

label1 (100px;left-margin:10px) value 1 (200px) label2
(100px) value2 (200px, right margin:10px)

Repeat the above so that all labels and values line up.
It looks suspiciously like tabular data. If it is, why don't you use a
table? That's what it's for.

--
Berg


Reply With Quote
  #3  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: alignment using CSS - 02-26-2008 , 08:05 PM



ashkaan57 (AT) hotmail (DOT) com wrote:
Quote:
Hi,
I am trying to align a couple of rows of data/label using CSS and am
failing. I tried to use span with width but soon realized can't assign
width to inline elements.
I am trying to do something like:

label1 (100px;left-margin:10px) value 1 (200px) label2
(100px) value2 (200px, right margin:10px)

What is this? It is neither html nor css...

Quote:
Repeat the above so that all labels and values line up.
How about a url to what you are attempting rather than your pseudocode?


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #4  
Old   
ashkaan57@hotmail.com
 
Posts: n/a

Default Re: alignment using CSS - 02-26-2008 , 11:15 PM



On Feb 26, 7:10*pm, Bergamot <berga... (AT) visi (DOT) com> wrote:
Quote:
ashkaa... (AT) hotmail (DOT) com wrote:

I am trying to do something like:

label1 (100px;left-margin:10px) * *value 1 (200px) * * * * * label2
(100px) * * *value2 (200px, right margin:10px)

Repeat the above so that all labels and values line up.

It looks suspiciously like tabular data. If it is, why don't you use a
table? That's what it's for.

--
Berg
It is actually a form. That's why I did not want to use tables. If I
was merely displaying data, I would have used a table.
It is for asp.net page, the data comes from the database. I just want
to line up the labels and data without using tables. If it is not
possible, or does not make sense, then I will use table, but I thought
it was discouraged to do so.


Reply With Quote
  #5  
Old   
dorayme
 
Posts: n/a

Default Re: alignment using CSS - 02-26-2008 , 11:34 PM



In article
<06d32acd-dfc6-4e94-bec4-b3d4b01c32bd (AT) p43g2000hsc (DOT) googlegroups.co
m>,
ashkaan57 (AT) hotmail (DOT) com wrote:

Quote:
On Feb 26, 7:10*pm, Bergamot <berga... (AT) visi (DOT) com> wrote:
ashkaa... (AT) hotmail (DOT) com wrote:

I am trying to do something like:

label1 (100px;left-margin:10px) * *value 1 (200px) * * * * * label2
(100px) * * *value2 (200px, right margin:10px)

Repeat the above so that all labels and values line up.

It looks suspiciously like tabular data. If it is, why don't you use a
table? That's what it's for.

--
Berg

It is actually a form. That's why I did not want to use tables. If I
was merely displaying data, I would have used a table.
It is for asp.net page, the data comes from the database. I just want
to line up the labels and data without using tables. If it is not
possible, or does not make sense, then I will use table, but I thought
it was discouraged to do so.
It is possible and it does make sense but you still should use a
table because it makes more sense to do this. It is like this. If
you are discouraged from using a hammer and well-aimed chisel on
an accessible-by-spanner nut, this does not mean that you should
use a hammer and chisel on an accessible-by-spanner nut on a
motor bike or boat or washing machine.

--
dorayme


Reply With Quote
  #6  
Old   
rf
 
Posts: n/a

Default Re: alignment using CSS - 02-26-2008 , 11:40 PM




"dorayme" <doraymeRidThis (AT) optusnet (DOT) com.au> wrote


Quote:
It is possible and it does make sense but you still should use a
table because it makes more sense to do this. It is like this. If
you are discouraged from using a hammer and well-aimed chisel on
an accessible-by-spanner nut, this does not mean that you should
use a hammer and chisel on an accessible-by-spanner nut on a
motor bike or boat or washing machine.
What?




Reply With Quote
  #7  
Old   
ashkaan57@hotmail.com
 
Posts: n/a

Default Re: alignment using CSS - 02-27-2008 , 01:00 AM



On Feb 27, 12:34*am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
Quote:
In article
06d32acd-dfc6-4e94-bec4-b3d4b01c3... (AT) p43g2000hsc (DOT) googlegroups.co
m>,





*ashkaa... (AT) hotmail (DOT) com wrote:
On Feb 26, 7:10*pm, Bergamot <berga... (AT) visi (DOT) com> wrote:
ashkaa... (AT) hotmail (DOT) com wrote:

I am trying to do something like:

label1 (100px;left-margin:10px) * *value 1 (200px) * * * * * label2
(100px) * * *value2 (200px, right margin:10px)

Repeat the above so that all labels and values line up.

It looks suspiciously like tabular data. If it is, why don't you use a
table? That's what it's for.

--
Berg

It is actually a form. That's why I did not want to use tables. If I
was merely displaying data, I would have used a table.
It is for asp.net page, the data comes from the database. I just want
to line up the labels and data without using tables. If it is not
possible, or does not make sense, then I will use table, but I thought
it was discouraged to do so.

It is possible and it does make sense but you still should use a
table because it makes more sense to do this. It is like this. If
you are discouraged from using a hammer and well-aimed chisel on
an accessible-by-spanner nut, this does not mean that you should
use a hammer and chisel on an accessible-by-spanner nut on a
motor bike or boat or washing machine.

--
dorayme- Hide quoted text -

- Show quoted text -
OK, I am totally confused now. I hear that it is good design not to
use tables when I am not just displaying data (where it makes sense to
use tables.) Also, to comply with section 508 (I think it is 508), use
of tables is also discouraged since some readers have diffciulty
reading tables.
But now I am being told it is OK to use tables, even if I am not just
displaying data. Should I, ot shouldn't I, use CSS if all I am doing
is aligning a bunch of controls (labels, dropdowns, textboxes, ..) on
a page?


Reply With Quote
  #8  
Old   
dorayme
 
Posts: n/a

Default Re: alignment using CSS - 02-27-2008 , 01:23 AM



In article
<ecfc5606-2cd2-40a9-965b-48de3d731655 (AT) n75g2000hsh (DOT) googlegroups.co
m>,
ashkaan57 (AT) hotmail (DOT) com wrote:

Quote:
On Feb 27, 12:34*am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
In article
06d32acd-dfc6-4e94-bec4-b3d4b01c3... (AT) p43g2000hsc (DOT) googlegroups.co
m>,

...
It is actually a form. That's why I did not want to use tables. If I
was merely displaying data, I would have used a table.
It is for asp.net page, the data comes from the database. I just want
to line up the labels and data without using tables. If it is not
possible, or does not make sense, then I will use table, but I thought
it was discouraged to do so.

It is possible and it does make sense but you still should use a
table because it makes more sense to do this. ...

OK, I am totally confused now. I hear that it is good design not to
use tables when I am not just displaying data (where it makes sense to
use tables.) Also, to comply with section 508 (I think it is 508), use
of tables is also discouraged since some readers have diffciulty
reading tables.
But now I am being told it is OK to use tables, even if I am not just
displaying data. Should I, ot shouldn't I, use CSS if all I am doing
is aligning a bunch of controls (labels, dropdowns, textboxes, ..) on
a page?
Well, you were told in an early response here, yes. I say yes
too. Who is telling you otherwise specifically for this situation?

You see, it is your "even if I am not just displaying data" that
I was focussing on. Let me put it as I understand it. Just
because you are not JUST displaying data, does not mean you
should not use tables. Why should it? If you are displaying
tables - even if you are also doing something else as well, eg.
eliciting replies in a form, or whatever, tables are, prima
facie, the tool to use. You need an argument for *not* using
them. And your "I hear that it is good design not to
use tables when I am not just displaying data" is not much of an
argument.

Perhaps I am reading you in a way that others are not reading
you? I don't know. I am sorry to have caused any confusion.

--
dorayme


Reply With Quote
  #9  
Old   
dorayme
 
Posts: n/a

Default Re: alignment using CSS - 02-27-2008 , 01:25 AM



In article <aJ6xj.19789$421.15994 (AT) news-server (DOT) bigpond.net.au>,
"rf" <rf (AT) invalid (DOT) com> wrote:

Quote:
"dorayme" <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in message
news:doraymeRidThis-48E54C.16342527022008 (AT) news-vip (DOT) optusnet.com.au...

It is possible and it does make sense but you still should use a
table because it makes more sense to do this. It is like this. If
you are discouraged from using a hammer and well-aimed chisel on
an accessible-by-spanner nut, this does not mean that you should
use a hammer and chisel on an accessible-by-spanner nut on a
motor bike or boat or washing machine.

What?
I am not going to explain this! Unless you put up some dough and
we have a fair referee (how about Luigi?) that you get it back if
I cannot make the analogy good. <g>

--
dorayme


Reply With Quote
  #10  
Old   
dorayme
 
Posts: n/a

Default Re: alignment using CSS - 02-27-2008 , 01:37 AM



In article
<doraymeRidThis-39CD08.18231027022008 (AT) news-vip (DOT) optusnet.com.au>,
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
If you are displaying
tables
"data" not "tables"...

sorry a typo...

(it is getting late in the day and I am having a ticklish problem
with IE 6 that is exhausting me...)

--
dorayme


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 - 2008, Jelsoft Enterprises Ltd.