SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's the best way to fake a Horizontal Rule Tag?

    What's the best way to fake a Horizontal Rule Tag?

    I tried making one:
    www.NewsForNow.com

    and the fake hr is 5 pixels high in IE but 1 pixel high in Firefox.

    Thanks ahead for your reply,
    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  2. #2
    Pedantic Semantic blain's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just add a border to the bottom of the revelant block level element, and pad it as needed.
    use CC to single out IE.
    Technology is dominated by two types of people:
    those who understand what they do not manage,
    and those who manage what they do not understand.

  3. #3
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi blain! Thanks for the reply,

    What is a CC?

    =-)

    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  4. #4
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, CC is Conditional Comment. It is used for writing codes specificly to IE and IE only. This is activated by writing the following code:
    Code:
    <!--[if IE]>
    <style>
    div.logo {
    	margin-left: 10px;
    }
    </style>
    <![endif]-->
    Whatever inside the conditional comments will be effective to IE only.

    Link: http://www.quirksmode.org/css/condcom.html
    In search of the clouds...and maybe some work

  5. #5
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would either of you mind putting the exact code I need here? I am not that great with div's / css yet. I appreciate your assistance!

    Thanks,
    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  6. #6
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    It's possible to style <hr>s cross-browser.

    Code:
    hr {
    height: 2px;
    border: none;
    border-top: 1px solid #000;
    background: #FFF;
    color: #000;
    overflow: hidden;
    margin: 1em 0;
    }

  7. #7
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Egor
    It's possible to style <hr>s cross-browser.
    Yes, but the moment you start using DIV for formatting, HR becomes a liability since in both Opera and Konqueror (although I hear KHTML did finally get a fix on this) horizontal rules tend to ignore the size of their parent containers and any floats, drawing across the full width of the screen regardless of what's around it. You can 'kind of' fix this behavior by using z-index to put them behind your float content, but that's not a 'real' fix.

    Which is why he's likely looking for an alternative.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •