Solved

Defining <HR> in CSS?

Posted on 2004-09-12
3
227 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now