How to move a div's border “up” one pixel with css


Tags: css

Problem :

I have a div, which I have given a border on top. The border needs to be shifted one pixel higher. Is this possible with CSS.



Solution :

You can accomplish this with a negative top margin

{ margin-top: -1px; }

very basic example: http://jsfiddle.net/zW6yD/


    CSS Howto..

    How to align p tag side by side using css?

    How to add a css transition color change for a link/div background

    In GWT 2.0 CssResource, how I can turn off obfuscation for all classes in just one CssResource

    How can I set all columns to be the same height? [duplicate]

    How do you use CSS to make a group of images that flow over the edges of the browser window?

    How to add a ToolTip for an icon inside my CSS file

    How can I center the below form?

    How to view the compiled css from sass files in ruby on rails?

    How to select 3rd 'a' tag in a list for RSpec test?

    how i can select some attribute value from in line css

    how to position two image as a background image on div by css

    CSS media queries [how to transform to hyperlinks via media queries]

    CSS: how to make nth table column border thicker when column count is variable?

    How to attach a CSS stylesheet to FXML?

    How do I animate my CSS progress bar?

    How can I split a text in 2 color vertically?

    How to grab the element with certain CSS property value inline

    CSS: How to drill all the underlying layers up to the background?

    How to Create Grid/Tile View with CSS?

    How to Toggle Switch - Prices and Config? [closed]

    How to use icon fonts

    Bootstrap table. How to remove all borders from table?

    Dropdown container not showing right padding

    How to avoid width calculation, can this be done with just CSS?

    How to apply table cell formatting using CSS

    How to style a

    inside a div with css [closed]

    How can I change the path to the css file dynamically?

    how to remove css property “element{}” [closed]

    Showing/hiding content with jQuery

    how can i add style with CSS to