How do I put a horizontal line/border right in the middle of a table row?


Tags: html,css

Problem :

Essentially I would like to apply a bottom-border, but rather than being in the bottom of the cell, I want it to be in the dead center.

How do I do that with CSS & HTML only (and using no graphics)?

So imagine the height of the cell/row is 50px, and width = 100px, I would like the line to be width = 100px, and it to be at 25px height in the row/cell.

Thanks.

P.S. Imagine something like the cross out functionality for font - but for an empty space (if that makes any sense).



Solution :

perhaps put an <hr> in the cell and then use CSS to give it an absolute position.


    CSS Howto..

    How to make a background color stretch to left and right of viewport in Safari Browsers

    Getting unordered list in front of image slide-show in IE8, IE7 and probably IE6

    How to include php page which include also a css file?

    How to show something only when user prints?

    how to use php variable in css

    How to preserve sibling element position when one sibling is absolutely positioned?

    How to set the padding of QTableView cells through CSS?

    How to make a div with a circular shape? [duplicate]

    How can I use :nth-child() to select every other
    within ALL children?

    How can I style the current (today's date) in bold font?

    How to convert a specific part of materialize.scss to css

    How to associate CSS classes? For example, the “apple” class is also from the “fruit” class?

    How to collapse div same like facebook chat

    How to change a scrolling element behavior on resize? (HTML, CSS, JavaScript) [duplicate]

    jQuery - How to make images overlap when fading in and out?

    How to vertically align label and input in Bootstrap 3?

    How to set input:focus style programatically using JavaScript

    How to serve different css files to different ajax pages?

    How to preserve margins and expand a div to fit its contents size?

    How can I style dynamically created elements within an iframe?

    How to remove spacing between the top of a border and a div [closed]

    How to use psd elements in an upload form? [closed]

    How to disable animation in a specific element in CSS

    How to use Sass mixin transition for applying transition-delay only?

    if i clone an element, when i customize (css) that element how can customize also the element cloned?

    How to find resources(CSS , JS Etc) that are blocking in Chrome

    how to position a div below an absolute div in css

    how to remove elements in document fragment after append

    How To Do A Webkit Slide Cover Page Transition

    ASP.NET - how to use CSS to align ASP.NET controls in a data entry situtaion?