Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 21st, 2005, 12:50 AM
Bob
Guest
 
Posts: n/a
Default Simple CSS question?

Hi Folks,

I am new to CSS and have a very basic question.

I am trying create a list of companies consisting of several one-liners in
the form of : company name, address, phone, description, etc. I want the
text to have no margins and no space between lines, but I want the first
line bold. And, I want a space between companies such as:

Name:_________. (bold)
Address:_____________.
Phone:__________.
Email:________________.
Website:__________________.
Description:_____________________.

(space)

Name:________________. (bold)
Phone:_____________________.
Address:_______________________________.
etc.

Can someone show me how to do this without using <br>'s?

Thanks a lot,

Bob


  #2  
Old July 21st, 2005, 12:50 AM
Chris Morris
Guest
 
Posts: n/a
Default Re: Simple CSS question?

"Bob" <ergobob@sonic[no spam].net> writes:[color=blue]
> I am trying create a list of companies consisting of several one-liners in
> the form of : company name, address, phone, description, etc. I want the
> text to have no margins and no space between lines, but I want the first
> line bold. And, I want a space between companies such as:[/color]


<div class="company">
<div class="name">[color=blue]
> Name:_________. (bold)[/color]
</div>
<div class="address">[color=blue]
> Address:_____________.[/color]
</div>
... you get the idea ...[color=blue]
> Phone:__________.
> Email:________________.
> Website:__________________.
> Description:_____________________.[/color]
</div>
</div>

div.company {
margin-bottom: 1.5em;
}

div.name {
font-weight: bold;
}

Personally I think it'd be better and possibly clearer as a table with
Name, Address, etc as column headers but that might give you display
problems if the description and/or address gets long. And it certainly
wouldn't look like that, if that's important to you.

--
Chris
  #3  
Old July 21st, 2005, 12:50 AM
Els
Guest
 
Posts: n/a
Default Re: Simple CSS question?

Bob wrote:
[color=blue]
> Hi Folks,
>
> I am new to CSS and have a very basic question.
>
> I am trying create a list of companies consisting of
> several one-liners in the form of : company name, address,
> phone, description, etc. I want the text to have no margins
> and no space between lines, but I want the first line bold.
> And, I want a space between companies such as:
>
> Name:_________. (bold)
> Address:_____________.
> Phone:__________.
> Email:________________.
> Website:__________________.
> Description:_____________________.
>
> (space)
>
> Name:________________. (bold)
> Phone:_____________________.
> Address:_______________________________.
> etc.
>
> Can someone show me how to do this without using <br>'s?[/color]

Wrap each company in its own <div>, or even use a table, as it
could be tabular data as far as I'm concerned.

<style type="text/css">
table{
margin:2em;
}
tr.name td{
font-weight:bold;
}
</style>
</head>
<body>
<table>
<tr class="name"><td>Name:</td><td> _______</td></tr>
<tr><td>Address:</td><td>______</td></tr>
<tr><td>Phone:</td><td>______</td></tr>
....
....
</table>

HTH

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: The Scene - Sex of fantasie
  #4  
Old July 21st, 2005, 12:50 AM
Rijk van Geijtenbeek
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 13:52:24 GMT, wrote:
[color=blue]
> Hi Folks,
>
> I am new to CSS and have a very basic question.[/color]

In which case, you might find it an interesting challenge to first try
some things yourself... That way, you learn the most.
[color=blue]
> I am trying create a list of companies consisting of several one-liners
> in the form of : company name, address, phone, description, etc. I want
> the text to have no margins and no space between lines, but I want the
> first line bold. And, I want a space between companies such as:
>
> Name:_________. (bold)
> Address:_____________.
> Phone:__________.
> Email:________________.
> Website:__________________.
> Description:_____________________.
>
> (space)
>
> Name:________________. (bold)
> Phone:_____________________.
> Address:_______________________________.
> etc.
>
> Can someone show me how to do this without using <br>'s?[/color]

Any specific reason to avoid <br>?

This is OKish even for semantic purists, and doesn't even require style
sheets:

<p><strong>Name:________________.</strong><br>
Phone:_____________________.<br>
Address:_______________________________.<br>
Email:________________.<br>
Website:__________________.<br>
Description:_____________________.</p>

<p><strong>Name:________________.</strong><br>
Phone:_____________________.<br>
Address:_______________________________.<br>
etc.



More fancy markup with a bit of style:

<div class="item">
<h2>Name:________________.</h2>
<p>Phone:_____________________.</p>
<p>Address:_______________________________.</p>
<p>Email:________________.</p>
<p>Website:__________________.</p>
<p>Description:_____________________.</p>
</div>

<div class="item">
<h2>Name:________________.</h2>
<p>Phone:_____________________.</p>
etc.

with these styles:

div.item {margin: 0 1em;}
div.item h2, div.item p {margin: 0;}
div.item h2 {font-size: medium; font-weight: bold;}


... where the H2 should be replaced with an appropriate header level
depending on the context.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
  #5  
Old July 21st, 2005, 12:51 AM
Chris Morris
Guest
 
Posts: n/a
Default Re: Simple CSS question?

Els <els.aNOSPAM@tiscali.nl> writes:[color=blue]
> Bob wrote:[color=green]
> > I am trying create a list of companies consisting of
> > several one-liners in the form of : company name, address,
> > phone, description, etc. I want the text to have no margins
> > and no space between lines, but I want the first line bold.
> > And, I want a space between companies such as:[/color]
>
> Wrap each company in its own <div>, or even use a table, as it
> could be tabular data as far as I'm concerned.
>
> <tr class="name"><td>Name:</td><td> _______</td></tr>[/color]
^^
<th>, surely. (<th scope="row"> would give a bit of an accessibility
boost without a slowdown, headers/id would be even more accessible but
a bit time-consuming)

--
Chris
  #6  
Old July 21st, 2005, 12:51 AM
Bob
Guest
 
Posts: n/a
Default Re: Simple CSS question?


"Chris Morris" <c.i.morris@durham.ac.uk> wrote in message
news:87isa6xupz.fsf@dinopsis.dur.ac.uk...[color=blue]
> "Bob" <ergobob@sonic[no spam].net> writes:[color=green]
> > I am trying create a list of companies consisting of several one-liners[/color][/color]
in[color=blue][color=green]
> > the form of : company name, address, phone, description, etc. I want the
> > text to have no margins and no space between lines, but I want the first
> > line bold. And, I want a space between companies such as:[/color]
>
>
> <div class="company">
> <div class="name">[color=green]
> > Name:_________. (bold)[/color]
> </div>
> <div class="address">[color=green]
> > Address:_____________.[/color]
> </div>
> ... you get the idea ...[color=green]
> > Phone:__________.
> > Email:________________.
> > Website:__________________.
> > Description:_____________________.[/color]
> </div>
> </div>
>
> div.company {
> margin-bottom: 1.5em;
> }
>
> div.name {
> font-weight: bold;
> }
>
> Personally I think it'd be better and possibly clearer as a table with
> Name, Address, etc as column headers but that might give you display
> problems if the description and/or address gets long. And it certainly
> wouldn't look like that, if that's important to you.
>
> --
> Chris[/color]

Hello Chris,

I did do this as a table and it worked fine. However, I was under the
assumption that using tables should be avoided for this type of layout. My
objective is to minimize the markup overhead and to make it as easy as
possible to convert previously constructed pages to my new CSS layout.

My original layout is at www.usernomics.com/ergonomic-products-data.html
My new table layout is at
http://www.usernomics.com/testsite/e...ucts-data.html
Another form of the same style is at www.usernomics.com/ergonomics-news.html

Am I wrong to think that a CSS solution would be most efficient?

Thanks,

Bob


  #7  
Old July 21st, 2005, 12:51 AM
Bob
Guest
 
Posts: n/a
Default Re: Simple CSS question?


"Rijk van Geijtenbeek" <rijk@opera.com> wrote in message
news:opseqe54xjicz8n2@news.individual.net...[color=blue]
> On Wed, 22 Sep 2004 13:52:24 GMT, wrote:
>[color=green]
> > Hi Folks,
> >
> > I am new to CSS and have a very basic question.[/color]
>
> In which case, you might find it an interesting challenge to first try
> some things yourself... That way, you learn the most.
>[color=green]
> > I am trying create a list of companies consisting of several one-liners
> > in the form of : company name, address, phone, description, etc. I want
> > the text to have no margins and no space between lines, but I want the
> > first line bold. And, I want a space between companies such as:
> >
> > Name:_________. (bold)
> > Address:_____________.
> > Phone:__________.
> > Email:________________.
> > Website:__________________.
> > Description:_____________________.
> >
> > (space)
> >
> > Name:________________. (bold)
> > Phone:_____________________.
> > Address:_______________________________.
> > etc.
> >
> > Can someone show me how to do this without using <br>'s?[/color]
>
> Any specific reason to avoid <br>?
>
> This is OKish even for semantic purists, and doesn't even require style
> sheets:
>
> <p><strong>Name:________________.</strong><br>
> Phone:_____________________.<br>
> Address:_______________________________.<br>
> Email:________________.<br>
> Website:__________________.<br>
> Description:_____________________.</p>
>
> <p><strong>Name:________________.</strong><br>
> Phone:_____________________.<br>
> Address:_______________________________.<br>
> etc.
>
>
>
> More fancy markup with a bit of style:
>
> <div class="item">
> <h2>Name:________________.</h2>
> <p>Phone:_____________________.</p>
> <p>Address:_______________________________.</p>
> <p>Email:________________.</p>
> <p>Website:__________________.</p>
> <p>Description:_____________________.</p>
> </div>
>
> <div class="item">
> <h2>Name:________________.</h2>
> <p>Phone:_____________________.</p>
> etc.
>
> with these styles:
>
> div.item {margin: 0 1em;}
> div.item h2, div.item p {margin: 0;}
> div.item h2 {font-size: medium; font-weight: bold;}
>
>
> .. where the H2 should be replaced with an appropriate header level
> depending on the context.
>
> --
> Rijk van Geijtenbeek
>
> The Web is a procrastination apparatus:
> It can absorb as much time as is required to ensure that you
> won't get any real work done. - J.Nielsen[/color]

Hello Rijk,

Thanks for the information.

I was under the impression that a perfect CSS would not require the use of
<br>. That when you had to resort to <br> it was indicitive of a CSS
imperfection. Is this a misunderstanding on my part?

I am trying to create an efficient page with the least amount of markup.

Thanks Again,

Bob


  #8  
Old July 21st, 2005, 12:51 AM
Chris Morris
Guest
 
Posts: n/a
Default Re: Simple CSS question?

"Bob" <ergobob@sonic[no spam].net> writes:[color=blue]
> I was under the impression that a perfect CSS would not require the use of
> <br>. That when you had to resort to <br> it was indicitive of a CSS
> imperfection. Is this a misunderstanding on my part?[/color]

It's _often_ indicative of something that could be done another way,
but there *are* legitimate uses of <br>. Any time you want a line
breaking, without it being semantically a different block, for example.

--
Chris
  #9  
Old July 21st, 2005, 12:51 AM
Chris Morris
Guest
 
Posts: n/a
Default Re: Simple CSS question?

"Bob" <ergobob@sonic[no spam].net> writes:[color=blue]
> I did do this as a table and it worked fine. However, I was under the
> assumption that using tables should be avoided for this type of layout. My
> objective is to minimize the markup overhead and to make it as easy as
> possible to convert previously constructed pages to my new CSS layout.[/color]

Tables are fine for tabular data - where there's a strong key:value
relationship, as there is here, it seems perfectly suited to a <table>.
[color=blue]
> My original layout is at www.usernomics.com/ergonomic-products-data.html
> My new table layout is at
> http://www.usernomics.com/testsite/e...ucts-data.html[/color]

That looks fine as a table - though you should probably use <th>s
(table header cells) in the first column of the table rather than
<td>s (table data cells)
[color=blue]
> Another form of the same style is at www.usernomics.com/ergonomics-news.html
>
> Am I wrong to think that a CSS solution would be most efficient?[/color]

Efficiency shouldn't be the main priority. Make sure the pages are
_correct_ and this usually leads to fairly efficient pages too.

--
Chris
  #10  
Old July 21st, 2005, 12:51 AM
Neal
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 15:19:31 GMT, wrote:
[color=blue]
> I was under the impression that a perfect CSS would not require the use
> of
> <br>. That when you had to resort to <br> it was indicitive of a CSS
> imperfection. Is this a misunderstanding on my part?
>
> I am trying to create an efficient page with the least amount of markup.[/color]

Good for you.

Nearly all the markup available in HTML 4.01 Strict is useful at some
time, so long as you use it wisely and for semantic reasons.

The br element is not to be used as a spacer for the rendered content,
because (drum roll) CSS is used for suggesting rendering! (Tada!)

But br is totally correct for creating a line break within, say, a
paragraph or heading.

<p>Whose woods these are I think I know<br>But still, I really have to
go<br>I hope he will not look and see<br>Me soaking up this birch with
pee.</p>

Like that. The same argument is made often here about tables (use for
tabular data, not for page layout), blockquote (use for a large quotation,
not to provide an indent) and even i (use for situations where standard
dtyle demands italics like a ship's name, not for decorative italics or
when var or em or some other markup is more semantically appropriate). The
elements aren't bad, just some common misues of them.
  #11  
Old July 21st, 2005, 12:51 AM
Beauregard T. Shagnasty
Guest
 
Posts: n/a
Default Re: Simple CSS question?

Quoth the raven Bob:
[color=blue]
> Hi Folks,
>
> I am new to CSS and have a very basic question.
>
> I am trying create a list of companies consisting of several one-liners in
> the form of : company name, address, phone, description, etc. I want the
> text to have no margins and no space between lines, but I want the first
> line bold. And, I want a space between companies such as:[/color]

Seems to me these are ... addresses.
[color=blue]
> Name:_________. (bold)
> Address:_____________.
> Phone:__________.
> Email:________________.
> Website:__________________.
> Description:_____________________.[/color]

<snip>

What about using the address element?

<address>
Name: <strong>ABC Company</strong><br>
Address: 321 Main Street<br>
Phone: 01 1 123 456<br>
Email: xyz@example.com<br>
Website: http://xyz.example.com<br>
Description: Sells computers
</address>

...then style the address element in your CSS to suit.

If the description is long-winded, you may want to move it to a
paragraph outside the address block.

--
-bts
-This space intentionally left blank.
  #12  
Old July 21st, 2005, 12:51 AM
Bob
Guest
 
Posts: n/a
Default Re: Simple CSS question?


"Neal" <neal413@yahoo.com> wrote in message
news:opseqjfkzu6v6656@news.individual.net...[color=blue]
> On Wed, 22 Sep 2004 15:19:31 GMT, wrote:
>[color=green]
> > I was under the impression that a perfect CSS would not require the use
> > of
> > <br>. That when you had to resort to <br> it was indicitive of a CSS
> > imperfection. Is this a misunderstanding on my part?
> >
> > I am trying to create an efficient page with the least amount of markup.[/color]
>
> Good for you.
>
> Nearly all the markup available in HTML 4.01 Strict is useful at some
> time, so long as you use it wisely and for semantic reasons.
>
> The br element is not to be used as a spacer for the rendered content,
> because (drum roll) CSS is used for suggesting rendering! (Tada!)
>
> But br is totally correct for creating a line break within, say, a
> paragraph or heading.
>
> <p>Whose woods these are I think I know<br>But still, I really have to
> go<br>I hope he will not look and see<br>Me soaking up this birch with
> pee.</p>
>
> Like that. The same argument is made often here about tables (use for
> tabular data, not for page layout), blockquote (use for a large quotation,
> not to provide an indent) and even i (use for situations where standard
> dtyle demands italics like a ship's name, not for decorative italics or
> when var or em or some other markup is more semantically appropriate). The
> elements aren't bad, just some common misues of them.[/color]

Hi Neal,

Love that quote. Actually, it takes a little pressure off of me. I hate to
turn to CSS for a one-off case of needing a <br>.

How about the use of <strong> when there is one word in a sentence that you
want to make bold? Would that be an appropriate use of markup rather than
trying to do it in CSS?

Thanks a lot Neal,

Bob


  #13  
Old July 21st, 2005, 12:51 AM
Bob
Guest
 
Posts: n/a
Default Re: Simple CSS question?


"Beauregard T. Shagnasty" <a.nony.mous@example.invalid> wrote in message
news:Imh4d.240873$bp1.104648@twister.nyroc.rr.com. ..[color=blue]
> Quoth the raven Bob:
>[color=green]
> > Hi Folks,
> >
> > I am new to CSS and have a very basic question.
> >
> > I am trying create a list of companies consisting of several one-liners[/color][/color]
in[color=blue][color=green]
> > the form of : company name, address, phone, description, etc. I want the
> > text to have no margins and no space between lines, but I want the first
> > line bold. And, I want a space between companies such as:[/color]
>
> Seems to me these are ... addresses.
>[color=green]
> > Name:_________. (bold)
> > Address:_____________.
> > Phone:__________.
> > Email:________________.
> > Website:__________________.
> > Description:_____________________.[/color]
>
> <snip>
>
> What about using the address element?
>
> <address>
> Name: <strong>ABC Company</strong><br>
> Address: 321 Main Street<br>
> Phone: 01 1 123 456<br>
> Email: xyz@example.com<br>
> Website: http://xyz.example.com<br>
> Description: Sells computers
> </address>
>
> ..then style the address element in your CSS to suit.
>
> If the description is long-winded, you may want to move it to a
> paragraph outside the address block.
>
> --
> -bts
> -This space intentionally left blank.[/color]

Hello Beauregard,

Well, my original markup used a similar layout that you suggest. I simply
used <p>'s and <br> between lines. But I was trying to create a markup with
less overhead.

The example I used is just as you said, names and addresses. I have two
other forms of similar layout that are not names and addresses though. The
three types of information with similar layout can be seen at:

www.usernomics.com/ergonomic-products-audio.html
http://www.usernomics.com/human-fact...s-design1.html
www.usernomics.com/ergonomics-news.html

I may be being too compulsive. With the number of pages involved, I was
trying to be efficient in my markup.

So the choice is: markup only, tables, or CSS.

Thanks,

Bob


  #14  
Old July 21st, 2005, 12:51 AM
Neal
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 16:05:40 GMT, wrote:
[color=blue]
> Love that quote. Actually, it takes a little pressure off of me. I hate
> to
> turn to CSS for a one-off case of needing a <br>.[/color]

Again, it all depends on what you're trying to do. If you need to put a
carriage return into a string of inline content, br's the tool. If you
need a blank line between boxes of content, margin's the tool.
[color=blue]
> How about the use of <strong> when there is one word in a sentence that
> you
> want to make bold? Would that be an appropriate use of markup rather than
> trying to do it in CSS?[/color]

Again, it all depends on what you're trying to do. If you read the
content, would you speak the word strongly? If that's a justified reading
of the text, ok. If it's merely a decoration, strong won't work right. Use
the CSS property font-weight instead.

In the current context, where a word will be a control to do something,
emphasis is justified in my opinion. Others may differ, that's OK.
  #15  
Old July 21st, 2005, 12:51 AM
Neal
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 16:02:48 GMT, Beauregard T. Shagnasty
<a.nony.mous@example.invalid> wrote:
[color=blue]
> What about using the address element?
>
> <address>
> Name: <strong>ABC Company</strong><br>
> Address: 321 Main Street<br>
> Phone: 01 1 123 456<br>
> Email: xyz@example.com<br>
> Website: http://xyz.example.com<br>
> Description: Sells computers
> </address>[/color]

Address is for marking up a page's author contact info. If that's what's
being done, OK.
  #16  
Old July 21st, 2005, 12:51 AM
Michael Stemper
Guest
 
Posts: n/a
Default Re: Simple CSS question?

In article <ssf4d.14656$54.220486@typhoon.sonic.net>, Bob writes:
[color=blue]
>I am trying create a list of companies consisting of several one-liners in
>the form of : company name, address, phone, description, etc. I want the
>text to have no margins and no space between lines, but I want the first
>line bold. And, I want a space between companies such as:
>
>Name:_________. (bold)
>Address:_____________.
>Phone:__________.
>Email:________________.
>Website:__________________.
>Description:_____________________.[/color]

[snip]

My question's really more towards the other respondents. Why wouldn't the
correct markup be a definition list per company? It seems semantically
correct: you're defining the name, address, etc. for each company.

--
Michael F. Stemper
#include <Standard_Disclaimer>
No animals were harmed in the composition of this message.

  #17  
Old July 21st, 2005, 12:51 AM
Neal
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 11:40:07 -0500, Michael Stemper
<mstemper@siemens-emis.com> wrote:
[color=blue]
> In article <ssf4d.14656$54.220486@typhoon.sonic.net>, Bob writes:[color=green]
>> Name:_________. (bold)
>> Address:_____________.
>> Phone:__________.
>> Email:________________.
>> Website:__________________.
>> Description:_____________________.[/color]
> My question's really more towards the other respondents. Why wouldn't the
> correct markup be a definition list per company? It seems semantically
> correct: you're defining the name, address, etc. for each company.[/color]

Hmm... I suppose it's arguable, but isn't "Name" the definition of the
term "Michael Stemper", not the other way around?

There is a one-to-one correspondence, but that isn't enough to merit dl
markup, I don't think. A table would be appropriate markup here, though,
as you're organizing content which is related by row and by column.
  #18  
Old July 21st, 2005, 12:51 AM
Bob
Guest
 
Posts: n/a
Default Re: Simple CSS question?


"Neal" <neal413@yahoo.com> wrote in message
news:opseql45ms6v6656@news.individual.net...[color=blue]
> On Wed, 22 Sep 2004 11:40:07 -0500, Michael Stemper
> <mstemper@siemens-emis.com> wrote:
>[color=green]
> > In article <ssf4d.14656$54.220486@typhoon.sonic.net>, Bob writes:[color=darkred]
> >> Name:_________. (bold)
> >> Address:_____________.
> >> Phone:__________.
> >> Email:________________.
> >> Website:__________________.
> >> Description:_____________________.[/color]
> > My question's really more towards the other respondents. Why wouldn't[/color][/color]
the[color=blue][color=green]
> > correct markup be a definition list per company? It seems semantically
> > correct: you're defining the name, address, etc. for each company.[/color]
>
> Hmm... I suppose it's arguable, but isn't "Name" the definition of the
> term "Michael Stemper", not the other way around?
>
> There is a one-to-one correspondence, but that isn't enough to merit dl
> markup, I don't think. A table would be appropriate markup here, though,
> as you're organizing content which is related by row and by column.[/color]

Hi Again Neil,

But are tables appropriate when you only have one column?

Also, I actually have three different formats that are similar in layout but
different in content. Currently, they are all done with simple markup using
<p>'s and <br>'s. You can see the three types at:

www.usernomics.com/ergonomic-products-audio.html
http://www.usernomics.com/human-fact...s-design1.html
www.usernomics.com/ergonomics-news.html

Do you think that all three of these would best be done with plain markup,
tables, or CSS?

Thanks a lot,

Bob


  #19  
Old July 21st, 2005, 12:51 AM
Neal
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 16:54:55 GMT, wrote:
[color=blue]
> Do you think that all three of these would best be done with plain
> markup,
> tables, or CSS?[/color]

http://www.usernomics.com/ergonomic-products-audio.html - nested unordered
lists. Each entry is a list of info, and the whole section is a list of
lists. Modify presentation with CSS. Use whatever heading makes sense in
the page design.

<ul>
<li><h?>Andrea Electronics Corporation</h?>
<ul>
<li>Long Island City, NY, 11101</li>
<li>Phone: (718) 729-8500</li>
etc...
</ul>
</li>
<li><h?>The next one</h?>
<ul>
<li>Listed information</li>
etc...

http://www.usernomics.com/human-fact...s-design1.html - similar.

<ul>
<li><h?>An Introduction to Usability</h?>
<ul>
<li>by Patrick W. Jordan</li>
<li>February 1999</li>
</ul>
<p>Introduction to the topic of usability...</p>
</li>
<li><h?>The next title</h?>
<ul>
<li>Etc.</li>
....

http://www.usernomics.com/ergonomics-news.html - no list info here as far
as I can see, though list markup could be applied with each li containing
each blurb.

<h?>Risky Business: Firms Can Reduce Human Errors Through Proactive Use of
Risk Analysis</h?>
<p>It should come as no surprise ... and indicates how they can be used to
assess business-centric risks.</p>
<cite>(full article): Medical News IT Tech Wire, Setptember 20, 2004</cite>

And there are other possible interpretations for all of these, too.

  #20  
Old July 21st, 2005, 12:51 AM
Beauregard T. Shagnasty
Guest
 
Posts: n/a
Default Re: Simple CSS question?

Quoth the raven Neal:
[color=blue]
> On Wed, 22 Sep 2004 16:02:48 GMT, Beauregard T. Shagnasty
> <a.nony.mous@example.invalid> wrote:
>[color=green]
>> What about using the address element?
>>
>> <address>
>> Name: <strong>ABC Company</strong><br>
>> Address: 321 Main Street<br>
>> Phone: 01 1 123 456<br>
>> Email: xyz@example.com<br>
>> Website: http://xyz.example.com<br>
>> Description: Sells computers
>> </address>[/color]
>
>
> Address is for marking up a page's author contact info. If that's what's
> being done, OK.[/color]

Ok, but aren't his names and addresses essentially contact
information? It sounds semantically correct to me...

--
-bts
-This space intentionally left blank.
  #21  
Old July 21st, 2005, 12:51 AM
Neal
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 17:24:02 GMT, Beauregard T. Shagnasty
<a.nony.mous@example.invalid> wrote:
[color=blue]
> Quoth the raven Neal:[color=green]
>> Address is for marking up a page's author contact info. If that's
>> what's being done, OK.[/color]
>
> Ok, but aren't his names and addresses essentially contact information?
> It sounds semantically correct to me...[/color]

http://www.w3.org/TR/html401/struct/...l#edef-ADDRESS

"The ADDRESS element may be used by authors to supply contact information
for a document or a major part of a document such as a form. This element
often appears at the beginning or end of a document."

For historical purposes, http://www.w3.org/TR/REC-html32#address

"The ADDRESS element requires start and end tags, and specifies
information such as authorship and contact details for the current
document. User agents should render the content with paragraph-breaks
before and after. Note that the content is restricted to paragraphs, plain
text and text-like elements as defined by the %text entity."

and http://www.ietf.org/rfc/rfc1866.txt

"5.5.3. Address: ADDRESS

The <ADDRESS> element contains such information as address, signature
and authorship, often at the beginning or end of the body of a
document."

So in all versions of HTML, the address element refers to the contact
information of the author of the document we are reading. It is not
appropriate markup for "any" address.
  #22  
Old July 21st, 2005, 12:51 AM
Beauregard T. Shagnasty
Guest
 
Posts: n/a
Default Re: Simple CSS question?

Quoth the raven Neal:
[color=blue]
> So in all versions of HTML, the address element refers to the
> contact information of the author of the document we are reading.
> It is not appropriate markup for "any" address.[/color]

Yes, I did read all that. It just seems easier to mark up an address
with an address element. <g>

Thanks for your answers.
--
-bts
-This space intentionally left blank.
  #23  
Old July 21st, 2005, 12:51 AM
Bob
Guest
 
Posts: n/a
Default Re: Simple CSS question?


"Neal" <neal413@yahoo.com> wrote in message
news:opseqneny06v6656@news.individual.net...[color=blue]
> On Wed, 22 Sep 2004 16:54:55 GMT, wrote:
>[color=green]
> > Do you think that all three of these would best be done with plain
> > markup,
> > tables, or CSS?[/color]
>
> http://www.usernomics.com/ergonomic-products-audio.html - nested unordered
> lists. Each entry is a list of info, and the whole section is a list of
> lists. Modify presentation with CSS. Use whatever heading makes sense in
> the page design.
>
> <ul>
> <li><h?>Andrea Electronics Corporation</h?>
> <ul>
> <li>Long Island City, NY, 11101</li>
> <li>Phone: (718) 729-8500</li>
> etc...
> </ul>
> </li>
> <li><h?>The next one</h?>
> <ul>
> <li>Listed information</li>
> etc...
>
> http://www.usernomics.com/human-fact...s-design1.html - similar.
>
> <ul>
> <li><h?>An Introduction to Usability</h?>
> <ul>
> <li>by Patrick W. Jordan</li>
> <li>February 1999</li>
> </ul>
> <p>Introduction to the topic of usability...</p>
> </li>
> <li><h?>The next title</h?>
> <ul>
> <li>Etc.</li>
> ...
>
> http://www.usernomics.com/ergonomics-news.html - no list info here as far
> as I can see, though list markup could be applied with each li containing
> each blurb.
>
> <h?>Risky Business: Firms Can Reduce Human Errors Through Proactive Use of
> Risk Analysis</h?>
> <p>It should come as no surprise ... and indicates how they can be used to
> assess business-centric risks.</p>
> <cite>(full article): Medical News IT Tech Wire, Setptember 20,[/color]
2004</cite>[color=blue]
>
> And there are other possible interpretations for all of these, too.
>[/color]

Hello Neal,

I gave it a shot but it did not quite work quite right for me. I placed a
sample of each of the three formats (Products, News, and Books) on the same
page at www.usernomics.com/testsite/test.html .


I tried creating a new <li> category because the <li> that I am currently
using elsewhere has a bullet and is indented. So I wanted to get one that
has no bullet and was left justified. I used this expression but it did not
work:

..single li{
text-align: left;
margin: 0; padding: 0;
}

..single{
list-style: none;
}

As you can see, I am not CSS proficient and am not sure how to create single
lines of <li>'s without the bullet and indent. Also, the Book information
did not wrap around the image.

Can you see what I did wrong?

Thanks,

Bob


  #24  
Old July 21st, 2005, 12:51 AM
Neal
Guest
 
Posts: n/a
Default Re: Simple CSS question?

On Wed, 22 Sep 2004 23:25:41 GMT, wrote:
[color=blue]
> .single li{
> text-align: left;
> margin: 0; padding: 0;
> }
>
> .single{
> list-style: none;
> }[/color]

You're so damn close! BTW, text-align: left is almost always the default
rendering for anything, no need to use that.
[color=blue]
> As you can see, I am not CSS proficient and am not sure how to create
> single
> lines of <li>'s without the bullet and indent.[/color]

The padding is also on the ul. Set that to margin: 0 and padding: 0 as
well, then change as you see fit.
[color=blue]
> Also, the Book information
> did not wrap around the image.[/color]

Put the image before the heading, and float the image left.

Try all that, lemme know.

  #25  
Old July 21st, 2005, 12:52 AM
Lauri Raittila
Guest
 
Posts: n/a
Default Re: Simple CSS question?

In article <opseqe54xjicz8n2@news.individual.net>, rijk@opera.com says...[color=blue]
> On Wed, 22 Sep 2004 13:52:24 GMT, wrote:
>[color=green]
> > Hi Folks,
> >
> > I am new to CSS and have a very basic question.[/color]
>
> In which case, you might find it an interesting challenge to first try
> some things yourself... That way, you learn the most.[/color]

And, 50% advice is most likely to be bullshit...
[color=blue]
> Any specific reason to avoid <br>?[/color]

If you someday decide to style your things again, you may be sorry you
used <br> instead of <div>. You need to edit HTML again.

<br> is good in cases where there is line break, and nothing else.
[color=blue]
> This is OKish even for semantic purists, and doesn't even require style
> sheets:[/color]

Surely it is not. That surely is not what most people understand what
paragraphs are. Tell me, in which language this would be a paragraph?
Correct markup would be table, or perhaps list. And I would say div would
be bad choise either, but certainly it is not paragraph.
[color=blue]
> <p><strong>Name:________________.</strong><br>
> Phone:_____________________.<br>[/color]
CSS:
table, tr, td, th {display:block;font-weight:normal;}
h2 {font-weight:bold;font-size:inherit;}
HTML:
<table><tr><th>Name:<td><h2>________</h2>
<tr><th>Phone:<td>______
....
</table>
....

2 in h2 guessed, use appropiate heading level.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
  #26  
Old July 21st, 2005, 12:52 AM
Lauri Raittila
Guest
 
Posts: n/a
Default Re: Simple CSS question?

In article <200409221640.i8MGe7X14892@mickey.empros.com>,
mstemper@siemens-emis.com says...[color=blue]
> My question's really more towards the other respondents. Why wouldn't the
> correct markup be a definition list per company?[/color]

Because it isn't. Address of a company is hardly a term, nor definition
of one.

DL is a table that is good for certain type of data, terms and
definitions.

OL is a table that is good if there is only one type of data, in certain
order

UL is atable with one kind of data in random order

TABLE is data in some other order




--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles