Solved

Defining <HR> in CSS?

Posted on 2004-09-12
3
229 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will learn how to count occurrences of each item in an array.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

777 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