Creating a dashed line

J

John Abbler

Does anyone know how to create a horizontal dashed line?

I would like something similar to a <hr>, except dashed, and I want to set
the color.

Thanks!
 
R

Roy Schestowitz

John said:
Does anyone know how to create a horizontal dashed line?

I would like something similar to a <hr>, except dashed, and I want to set
the color.

Thanks!

ELEMENT {
border-top: 3px dotted #000000;
margin-top: 5px;
}

Change ELEMENT to something currently unused; change colour and margin as it
suits you. Then embed the element in your document where you want to insert
a line.

Hope it helps,

Roy
 
J

John Abbler

Hi Roy,

Thank you for the quick response!

I am trying to implement your suggestion, but must confess I don't know how
to embed the element in my document.

I added these lines to my stylesheet:

testelement {
border-top: 3px dotted #000000;
margin-top: 5px;
}

The I tried to add this to my document:
<testelement />

But, I'm not having luck yet. Am I implementing this correctly?

Thanks, again.
 
R

Roy Schestowitz

John said:
Hi Roy,

Thank you for the quick response!

I am trying to implement your suggestion, but must confess I don't know
how to embed the element in my document.

I added these lines to my stylesheet:

testelement {
border-top: 3px dotted #000000;
margin-top: 5px;
}

The I tried to add this to my document:
<testelement />

But, I'm not having luck yet. Am I implementing this correctly?

Thanks, again.

Try H6 assuming you do not use it in the document already. The rest of this
newsgroup will slag me off for suggesting something that is
semantically-rotten. In my defence, I implemented something similar only in
a password-protected Wiki which I use for correspondence.

Anyway, just add <h6> </h6> at the points where you want the horizontal
line. You are essentially rendering the top part of a rectagular box.

Roy
 
B

Beauregard T. Shagnasty

John said:
I added these lines to my stylesheet:

testelement {
border-top: 3px dotted #000000;
margin-top: 5px;
}

That's incorrect CSS.
The I tried to add this to my document:
<testelement />

You can't make up HTML elements. :-(

Try this:

CSS:

..dashes {
border-top: 3px dashed #000000;
margin-top: 5px;
}

HTML:

<hr class='dashes'>

Alter to suit. Maybe even add a width in em or something.
width: 10em;

And please don't top-post.
 
J

JDS

Try H6 assuming you do not use it in the document already. The rest of this

Why? Seems a little bass-ackwards, and I'm not afraid to say it. Why not
just use a class and assign it to an HR (as suggested by someone else in
this thread)? That makes much more sense because

1) it will be more semantically correct -- <HR> is a horizontal line in
HTML

and

2) It will not cause problems later if, for some reason, you end up
actually *using* <h6> in your document

and

3) other reasons, I'm sure.

later...
 
D

dorayme

From: JDS said:
Why? Seems a little bass-ackwards, and I'm not afraid to say it. Why not
just use a class and assign it to an HR (as suggested by someone else in
this thread)? That makes much more sense because

Well, hang on a bit... it was just a suggestion that would work quite well!
So someone made a possibly better one. Alright already, let us all keep
perfectly calm.
1) it will be more semantically correct -- <HR> is a horizontal line in
HTML


and

2) It will not cause problems later if, for some reason, you end up
actually *using* <h6> in your document

Like that is likely...


:)

dorayme
 
J

Jonathan N. Little

Beauregard T. Shagnasty wrote:
CSS:

.dashes {
border-top: 3px dashed #000000;
margin-top: 5px;
}
<snip>

Minor tweak:

..dashes {
border-top: 3px dashed #000000;
*border-bottom: 0;*
margin-top: 5px;
}

And a note:

Works on the Geckos: NN6+, Moz, FF.... but on the MS side requires 5.5+

Of course using the proper element, i.e. HR, means that it gracefully
degrades on non-compliant browsers. The line won't be dashed but it will
be a recognizable horizontal rule.
 
B

Beauregard T. Shagnasty

Jonathan said:
but on the MS side requires 5.5+

Anyone still running less deserves all that they get! :-D
Of course using the proper element, i.e. HR, means that it
gracefully degrades on non-compliant browsers. The line won't be
dashed but it will be a recognizable horizontal rule.

That's why I picked it... <g>
 
R

Roy Schestowitz

dorayme said:
Well, hang on a bit... it was just a suggestion that would work quite
well! So someone made a possibly better one. Alright already, let us all
keep perfectly calm.


Like that is likely...

Thanks for supporting my suggestion. I sometimes feel reluctant to suggest
something that's not perfect. A Mr. Know-all would come out with some
fuckwit comment and tear other people's suggestions apart. I think
Beauregard was quite polite though.

Roy
 
B

Beauregard T. Shagnasty

Roy said:
Thanks for supporting my suggestion. I sometimes feel reluctant to
suggest something that's not perfect. A Mr. Know-all would come out
with some fuckwit comment and tear other people's suggestions
apart. I think Beauregard was quite polite though.

Whew!

Glad I'm not a Mr. Know-all... :-D
 
J

Jonathan N. Little

Beauregard said:
Anyone still running less deserves all that they get! :-D



That's why I picked it... <g>

I just got a order recently at my site and my debug info revealed the
client was running W2K and NN4.79! And I still get enough visitors with
WebTV that I struggle to tweak the site at least allow basic
navigation and reasonably aesthetic experience with that POS!
 
D

dorayme

From: Roy Schestowitz said:
I sometimes feel reluctant to suggest something that's not perfect...

Yes, I bet many have felt this way, there is always a tension between
offering advice that will short-term help someone fix a present problem in
terms that are easily understood and giving more long-term advice. The
latter is often more time consuming. I reckon what kchayka said once is not
too bad: "remember to wear your flame-retardant teflon suit when you come
here"

dorayme
 
D

dorayme

From: "Beauregard T. Shagnasty said:
Whew!

Glad I'm not a Mr. Know-all... :-D

Just hold it right there! You may be a polite one. Still, cheer up again, it
is the best kind.

dorayme
 
J

JDS

Thanks for supporting my suggestion. I sometimes feel reluctant to suggest
something that's not perfect. A Mr. Know-all would come out with some
fuckwit comment and tear other people's suggestions apart. I think
Beauregard was quite polite though.

Roy

Roy, your suggestion is not just "not perfect" but has actualy valid
reasons for not being a Good Idea(TM).

Don't feel reluctant for suggesting something that's not perfect. Your
suggestion would work, right? I was just pointing out reasons why I
thought it didn't seem like such a good idea.

As for polite, **** polite. This is Usenet. I wasn't particularly
IMpolite, though, was I? In fact, I actually thought I was on the cusp of
politeness, mitigated by straightforwardness that resulted in the
appearance of impoliteness.

At least that's my take on it.

I still say your idea of using <H6> sucks.
 
D

dorayme

From: JDS said:
I still say your idea of using <H6> sucks.

Say what you like. When I become king you will damn well use <h6> wherever
it will work instead of any other more goody goody correct markup. Things
are going to be very different, trust me... And by the way, there will be
serious consequences for any derogatory remarks about the misuse of <h6>.
<h6> will be compulsory. Get used to the idea. Now.

dorayme
 
R

Roy Schestowitz

JDS said:
Roy, your suggestion is not just "not perfect" but has actualy valid
reasons for not being a Good Idea(TM).


I know. Did I not admit that when I made the suggestion in the first place?

Don't feel reluctant for suggesting something that's not perfect. Your
suggestion would work, right? I was just pointing out reasons why I
thought it didn't seem like such a good idea.

As for polite, **** polite. This is Usenet. I wasn't particularly
IMpolite, though, was I? In fact, I actually thought I was on the cusp of
politeness, mitigated by straightforwardness that resulted in the
appearance of impoliteness.


Wait, wait... what I said is that you were _polite_ (unlike several others).
Check the thread again to see where the misunderstanding lies.

At least that's my take on it.

I still say your idea of using <H6> sucks.


I know! *smile* I never had it appear in public pages.

Roy
 
N

Neredbojias

With neither quill nor qualm, JDS quothed
As for polite, **** polite. This is Usenet. I wasn't particularly
IMpolite, though, was I? In fact, I actually thought I was on the cusp of
politeness, mitigated by straightforwardness that resulted in the
appearance of impoliteness.

At least that's my take on it.

I still say your idea of using <H6> sucks.

He he, you were politely impolitic.
 
J

JDS

Say what you like. When I become king you will damn well use <h6> wherever

Well I'm glad, at least, that everyone could sense my bit of irony and not
get too mad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top