[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Defining <HR> in CSS?

Posted on 2004-09-12
3
Medium Priority
?
239 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 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

872 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