hr top  margins difference ie and firefox

Posted on 2006-04-27
Last Modified: 2011-10-03
I am using an HR tag, (horozontal rule) I am using the following css too

.myruler {
width: 100%; background-color:#CC0033;
height: 1px;
border: none;
margin-top: -4px; padding: 0px;

what can I do to maintain the same hr top margin with both ff and ie. I want my hr to be directly under my text at 100% ,

<div style="margin-left:12px; margin-right: 12px;"> Welcome!
          <hr class="myruler"></hr>


Question by:thatelvis
    LVL 30

    Accepted Solution

    HR has bad cross-browser support.  Use a border instead:

    <div style="border-bottom: 1px solid #CC0033; margin-left:12px; margin-right: 12px;"> Welcome!
    LVL 1

    Author Comment

    thanks I got there in the end. i had tried everything poss with the hr. any way a is well now.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
    Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
    In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    737 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

    18 Experts available now in Live!

    Get 1:1 Help Now