Solved

Defining <HR> in CSS?

Posted on 2004-09-12
3
230 Views
Last Modified: 2006-11-17
Hi!

I'd like to define a couple of different <HR> lines (for example, one <HR> with shades and specific color, another <HR> with different color and size, etc.) in external CSS, but I can't find a solution. I know how to define a 'global' <HR> (for a whole page/site), but I need several different predefined lines.  

Thanks in advance for any input,
Le
0
Comment
Question by:athanasius296
  • 2
3 Comments
 
LVL 8

Expert Comment

by:klykken
ID: 12038775
Hi Le,
This is dont by adding a CLASS to some of your elements:

Examples

CSS:
<style type="text/css">
<!--
hr {width:100%;}
hr.overarticle {width:80%;}
hr.underarticle {width: 50%;}
-->
</style>

HTML:
<hr>
<hr class="overarticle">
<hr class="underarticle">

Good Luck :-)
-klykken
0
 

Author Comment

by:athanasius296
ID: 12039962
Hi klynnen,

For some reason "width" in my external css file doesn't work:
hr.overarticle {align:left; width:24%; color:#cccccc; noShade;}
Any thoughts?
Thanks!
Le
0
 
LVL 8

Accepted Solution

by:
klykken earned 50 total points
ID: 12040121
Hi Le,
yes, there is not 'align' in CSS.
use 'text-align'

Also 'noshade' is not css either.

Change your css to this:
hr.overarticle {
      text-align:left;
      width:24%;
      color:#cccccc;
      }

-klykken
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question