Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > style sheets left/right align simultaneously?

Reply
Thread Tools

style sheets left/right align simultaneously?

 
 
Keith Wiley
Guest
Posts: n/a
 
      11-08-2003
On Sat, 8 Nov 2003, nice.guy.nige wrote:

> While the city slept, Brett <(E-Mail Removed)> feverishly typed:
>
> > o.k...maybe we need clarification on which one is the car. You tell
> > me which one is quicker to type.

>
> The example presented by the OP suggests tabular data, so a table would
> probably be the best place to put it. By all means use style sheets to align
> the data within the table. Tables are not all bad. They are perfect for
> presenting tabular data - that is what they were designed for. It is
> designers using them for layout that has given them a bad name.


Well, I tried the table recommendation made by someone at the to of this
thread, but the table doesn't position itself properly in the context of
the rest of the resume which, so far, is css positioned <P> tags for the
most part, with a few <H3> tags. The table doesn't flow down the page the
way the <P> items do. It's printed on top of them. I tried setting
position to relative, but it doesn't make any difference, the position
isn't, in fact, relative with relation to the rest of the block items that
are relatively flowing down the page.

I guess it isn't possible to mix tables with css because they print on top
of each other, so if I use a table for one small portion of the resume
which is in list format with right alignments, I am then forced to discard
css for the entire resume layout and use a table for the whole darn thing,
right? I mean, sure, I can use css to personalize the look of the table,
but I can't use css for the layout of the page if the page has a table on
it. Am I wrong? I'm using Netscape 7, so I'm guessing it's as up to date
as they come.

__________________________________________________ ______________________
Keith Wiley http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley

"Yet mark his perfect self-contentment, and hence learn his lesson,
that to be self-contented is to be vile and ignorant, and that to
aspire is better than to be blindly and impotently happy."
-- Edwin A. Abbott, Flatland
__________________________________________________ ______________________
 
Reply With Quote
 
 
 
 
Brett
Guest
Posts: n/a
 
      11-08-2003

> > You tell me which one is quicker to type.

>
> Why would that matter?


I personally like to produce pages as quick as possible and if I can
accomplish the same thing with less typing that helps. This example may not
be a very big difference but it wasn't that long ago I was nesting lots of
tables inside each other to accomplish the layout desired. Now, with css, I
can produce the same layout with about have the code. I also have the
flexibility to easily move content around with css. Many times with nested
tables you basically have to start from scratch to move content around.

Basically css is a big time saver!

> Well, you need to understand tables before you can use them properly.
> You are using superfluous and even harmful attributes and not using some
> useful attributes,


Maybe you should be more specific. I have used tables for a long time and
have had them looking great on many different OS's and browsers while
validating.

> and you have missed the point that tables are for
> describing the structure of tabular data, not for specifying a particular
> visual formatting for it - that's what CSS is for (though we might accept
> some presentational attributes as interim workarounds, if you ask nicely).


I was suggesting css?

> If you decide to change the structure of the page, then the markup should

be
> changed accordingly.


why? If css is used you could change it very quickly for every file that
referenced it. Again, if you have one hundred static pages...it would take
a lot longer to go through every file and modify the markup.

--
Brett
Provision Tech
http://www.provisiontech.net


 
Reply With Quote
 
 
 
 
Brett
Guest
Posts: n/a
 
      11-08-2003
> The example presented by the OP suggests tabular data, so a table would
> probably be the best place to put it. By all means use style sheets to

align
> the data within the table. Tables are not all bad. They are perfect for
> presenting tabular data - that is what they were designed for. It is
> designers using them for layout that has given them a bad name.


I completely agree to use tables for tabular data. I basically read through
the first question to quick and was picturing just one line of text and
figured css would be a good solution.

Although now that you bring it up why not use css for tablular layout....

<span style="position: absolute; text-align: left; top: 100px;">
line1<br>
line2<br>
line3<br>
</span>
<span style="position:absolute; right: 0; top: 100px;">
line1<br>
line2<br>
line3<br>
</span>

sure you can't use borders and things around each item but what if you
didn't want to anyway? Although I guess you could if you wrapped each line
with a tag that had a border on it. Really its no different than using <td>
around each item. Maybe its just the fact that tables are for this and even
though you can accomplish the same thing with css you should stick to using
the correct tags. But, then again if you ever thought you might move the
"right text" to a different position on the screen, maybe css should be
used?

--
Brett
Provision Tech
http://www.provisiontech.net


 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      11-08-2003
Gazing into my crystal ball I observed Keith Wiley <(E-Mail Removed)>
writing in news(E-Mail Removed) .unm.edu:

> On Sat, 8 Nov 2003, Adrienne wrote:
>
>> Your resume screams for CSS. You do not need tables for your resume,
>> unless you are needing to use tabular data. You're using depreciated
>> markup, you have elements that are not closed, no Document Type
>> declaration, spacer gifs, etc. A resume on a black background also
>> does not look that professional (in my opinion), and may cause a
>> recruiter/employer that has tired eyes from looking at hundreds of
>> resumes to not even read it.

>
> Actually, what you were looking at is rather old. You seem to have
> missed the point of my main question, being that I am in the process of
> redesigning my entire site with clean closed tags, dark text on light
> background, all the other stuff you just recommended as if you think I
> just thought of it for the first time. I wasn't asking for a critique
> of my old resume, I was asking syntax questions of how to layout my new
> resume. Wasn't I fairly clear about that?


<quote>
In particular, I'm trying to layout my resume, and I
thought it might be messy to mix stylesheets with tables. But perhaps
that's the right way to do it.
</quote>

Since you did not provide a URL, I looked at the old resume. Forgive me.

>
> Thanks for the pointers anyway, but none of them really answer my
> question now do they? Not too helpful.
>


As others have said, if you have tabular data, then use tables. If you do
not, then use the correct markup. I gave you the URL to my resume so you
could look at the markup as a reference.


--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-09-2003
"Brett" <(E-Mail Removed)> wrote:

> I personally like to produce pages as quick as possible and if I can
> accomplish the same thing with less typing that helps.


You are not accomplishing the same thing. Try using a non-CSS browser and
you will see what I mean.

> it wasn't that long ago I was nesting
> lots of tables inside each other to accomplish the layout desired.
> Now, with css, I can produce the same layout with about have the code.


That's fine. Your past abuse of tables does not, however, mean that tables
should not be used when you actually have tabular data.

>> Well, you need to understand tables before you can use them properly.
>> You are using superfluous and even harmful attributes and not using
>> some useful attributes,

>
> Maybe you should be more specific. I have used tables for a long time
> and have had them looking great on many different OS's and browsers
> while validating.


But apparently you don't understand what tables are meant for. You only have
experience with using them for something that they were not meant for, it
seems.

> I was suggesting css?


Yes, you were suggesting the use of CSS and meaningless (<span>) markup,
instead of adequate structural markup.

>> If you decide to change the structure of the page, then the markup
>> should be changed accordingly.

>
> why? If css is used you could change it very quickly for every file that
> referenced it.


By changing it, namely CSS, you would only change one suggested rendering of
the page.

> Again, if you have one hundred static pages...it would
> take a lot longer to go through every file and modify the markup.


If hundreds of static pages that may need structural revision are you
problem, maybe you should find better authoring tools, like preprocessors,
or maybe SSI. But regarding things like the order of columns in tables in a
hundred pages, it is generally best to decide on it and stick to it. Better
to think and test in advance than to change the structure (or at least the
appearance) in a way that makes the tables look different to users.
Reordering table columns on Web pages isn't really comparable to normal
tuning of visual appearance.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Keith Wiley
Guest
Posts: n/a
 
      11-09-2003
On Sat, 8 Nov 2003, Adrienne wrote:

> As others have said, if you have tabular data, then use tables. If you do
> not, then use the correct markup. I gave you the URL to my resume so you
> could look at the markup as a reference.


So, one thing I'm wondering is whether it is possible (or even advisable)
to mix css layout with table layout, because it seems hard to get the two
to line up together. If one small piece of a layout requires a table
(such as for the left-aligned second column in my original example) does
that mean that the entire page must then be laid out as a table?

__________________________________________________ ______________________
Keith Wiley (E-Mail Removed)
http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley

"Yet mark his perfect self-contentment, and hence learn his lesson,
that to be self-contented is to be vile and ignorant, and that to
aspire is better than to be blindly and impotently happy."
-- Edwin A. Abbott, Flatland
__________________________________________________ ______________________
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      11-09-2003
Gazing into my crystal ball I observed Keith Wiley <(E-Mail Removed)>
writing in news(E-Mail Removed) m.edu:

> On Sat, 8 Nov 2003, Adrienne wrote:
>
>> As others have said, if you have tabular data, then use tables. If
>> you do not, then use the correct markup. I gave you the URL to my
>> resume so you could look at the markup as a reference.

>
> So, one thing I'm wondering is whether it is possible (or even
> advisable) to mix css layout with table layout, because it seems hard
> to get the two to line up together. If one small piece of a layout
> requires a table (such as for the left-aligned second column in my
> original example) does that mean that the entire page must then be laid
> out as a table?
>


No, use table markup where it is appropriate. For example:

<div id="menu"> <!-- styled appropriately -->
<ul>
<li>menu item</li>
</ul>
</div>
<div id="content"> <!-- styled appropriately -->
<h1>ACME Widget Company Products</h1>
<table id="products" summary="Product List">
<caption>Product List</caption>
<thead>
<tr>
<th>Part #</th><th>Price</th>
</tr>
</thead>
<tbody>
<tr class="twhite">
<td>12345</td><td>1.00</td>
</tr>
<tr class="tgreen">
<td>67890</td><td>5.00</td>
</tr>
</tbody>
</table>
</div>
<div id="footer">
Page Footer
</div>

In the above example, each element can be styled. For example, the menu
could have a border around it, and the table could be styled like greenbar
paper, with perhaps a different font. The sky's the limit.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      11-09-2003
Keith Wiley wrote:

> On Sat, 8 Nov 2003, Adrienne wrote:
>
>> As others have said, if you have tabular data, then use tables. If you do
>> not, then use the correct markup. I gave you the URL to my resume so you
>> could look at the markup as a reference.

>
> So, one thing I'm wondering is whether it is possible (or even advisable)
> to mix css layout with table layout


Yes it is possible.

It is never *advisable* to mix table based layouts and CSS layouts simply
because it is never advisable to use tables for layouts at all.

If you follow the URL in my .signature, you will find a page that uses
CSS for layout, but uses a table for marking up... well... a table.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I get the style sheets (or style object) of the wholedocument? Jake Barnes Javascript 6 04-12-2009 08:15 AM
text-align vs align tshad HTML 1 06-23-2005 10:29 PM
Style sheets, include one style within another (not inheritance) foldface@yahoo.co.uk HTML 1 11-24-2003 01:37 PM
export to Excel - multiple sheets & renaming sheets Carl Corcoran ASP General 1 11-12-2003 07:28 PM
how to Align text left & vertical align middle Kay ASP .Net 2 07-25-2003 08:32 AM



Advertisments