Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / February 2008



Tip: Looking for answers? Try searching our database.

alignment using CSS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ashkaan57@hotmail.com - 27 Feb 2008 00:05 GMT
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.
Bergamot - 27 Feb 2008 00:10 GMT
> 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.

Signature

Berg

ashkaan57@hotmail.com - 27 Feb 2008 05:15 GMT
> ashkaa...@hotmail.com wrote:
>
[quoted text clipped - 10 lines]
> --
> 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.
dorayme - 27 Feb 2008 05:34 GMT
In article
<06d32acd-dfc6-4e94-bec4-b3d4b01c32bd@p43g2000hsc.googlegroups.co
m>,

> > ashkaa...@hotmail.com wrote:
> >
[quoted text clipped - 17 lines]
> 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.

Signature

dorayme

rf - 27 Feb 2008 05:40 GMT
> 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?
dorayme - 27 Feb 2008 07:25 GMT
> > 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
[quoted text clipped - 4 lines]
>
> 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>

Signature

dorayme

rf - 27 Feb 2008 08:03 GMT
>> > 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
[quoted text clipped - 8 lines]
> we have a fair referee (how about Luigi?) that you get it back if
> I cannot make the analogy good. <g>

There *must* be some words missing. The paragraph appears to be incomplete
and self contradictory. No wonder the OP is confused :-)

OP: Simple, if it's tablular data then use a table. At the extreme, if all
else fails and you still can't do what you want then use a table. To use
doraymes analogy (I think), sometimes there simply is not a spannar
available to fit that bolt.

Signature

Richard.

dorayme - 27 Feb 2008 22:39 GMT
> >> > 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
[quoted text clipped - 11 lines]
> There *must* be some words missing. The paragraph appears to be incomplete
> and self contradictory. No wonder the OP is confused :-)

Lets see, maybe you are right, maybe you are wrong. Let us parse
it together.

Before we begin, please everybody, get off your knees! I said
"parse" not "pray. Geez!

OP said "If it is not possible, or does not make sense, then I
will use table, but I thought it was discouraged to do so."

I then said:

"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."

No trouble there, surely?

"If you are discouraged from using a hammer and well-aimed chisel
on an accessible-by-spanner nut,"

An *in*accessible-by-spanner nut would be one which is hard to
get at and needing other than a spanner. OK?

Other than a spanner would be, for example, a chisel angled and
placed carefully on the nut and whacked with a hammer to loosen
the thing. No one would advise this brutality towards a nut that
was easily accessible by spanner. Right? It would be correct to
discourage such a thing. Just as we tend to advise people not to
use a table when other means of laying out non-tabular data are
to be had. The other means are the spanner.

So now you are invited to suppose in the sentence at this point
that you have been so discouraged while working on your car. The
car being a context.

"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".

At this point, Richard, I concede an unhappiness in my writing. I
could have done this better. OK?

But it still makes sense, it is not contradictory. OP, having
been advised not to use tables in one context seems to think that
when the context changes a bit (laying out forms from laying out
other divisions of a webpage) the good advice to use tables for
tabular data and not otherwise does not apply any more. The
advice that was applicable to a car is also applicable to a
washing machine in respect to the tools for nuts.

Signature

dorayme

ashkaan57@hotmail.com - 27 Feb 2008 07:00 GMT
> In article
> <06d32acd-dfc6-4e94-bec4-b3d4b01c3...@p43g2000hsc.googlegroups.co
[quoted text clipped - 34 lines]
>
> - 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?
dorayme - 27 Feb 2008 07:23 GMT
In article
<ecfc5606-2cd2-40a9-965b-48de3d731655@n75g2000hsh.googlegroups.co
m>,

> > In article
> > <06d32acd-dfc6-4e94-bec4-b3d4b01c3...@p43g2000hsc.googlegroups.co
[quoted text clipped - 20 lines]
> 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.

Signature

dorayme

dorayme - 27 Feb 2008 07:37 GMT
In article
<doraymeRidThis-39CD08.18231027022008@news-vip.optusnet.com.au>,

> 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...)

Signature

dorayme

Bergamot - 27 Feb 2008 14:54 GMT
> OK, I am totally confused now. I hear that it is good design not to
> use tables
> But now I am being told it is OK to use tables, even if I am not just
> displaying data.

It's not simply an issue of "just displaying data". It's an issue of
relationships. If there is a relationship between the rows and/or
columns, then consider it tabular 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?

Some argue that forms are not tabular data, but that's a matter of
opinion. There is a relationship between a form label, and its control,
isn't there? If you put in a column header for "labels" and one for
"data" it all makes sense, does it not?

I'd use a table.

Signature

Berg

ashkaan57@hotmail.com - 27 Feb 2008 16:04 GMT
> ashkaa...@hotmail.com wrote:
>
[quoted text clipped - 20 lines]
> --
> Berg

OK, it seems the popular consensu is to use tables to align labels and
controls in a form. If I didn't know, I would think I was visiting
"comp.infosystem.www.authoring.tables" newsgroup! :)
dorayme - 27 Feb 2008 21:37 GMT
In article
<5cc1d29e-18c7-45bf-a710-37522e2e2fd5@x41g2000hsb.googlegroups.co
m>,

> OK, it seems the popular consensu is to use tables to align labels and
> controls in a form. If I didn't know, I would think I was visiting
> "comp.infosystem.www.authoring.tables" newsgroup! :)

Like feeling you are meeting an established religion when talking
to a group of atheists? This feeling is a confusion of thought.

Signature

dorayme

Jonathan N. Little - 27 Feb 2008 02:05 GMT
> Hi,
> I am trying to align a couple of rows of data/label using CSS and am
[quoted text clipped - 4 lines]
> label1 (100px;left-margin:10px)    value 1 (200px)           label2
> (100px)      value2 (200px, right margin:10px)

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

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

How about a url to what you are attempting rather than your pseudocode?

Signature

Take care,

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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.