How To Move A DIV Element A Little Towards The Top

Tags: html,css,blogger

Problem :

I have an issue with the home-link image that I've coded for my hovering navigation bar. The URL to my blog is as follows : I would ideally like the image to appear in-line with the tabs text that is beside it however no matter what I do I cant seem to move the "home" icon slightly up. I have tried to play about with padding and margin values but to no avail. I only need to move the image approximately 15px towards the top but I cant figure out how to go about it. I have included the html and css coding below :

#wctopdropcont { 
padding: 5.5px 0 0 0;
left: 0px;

opacity: 0.9;
filter: alpha(opacity=90);

<div id='wctopdropcont'>

<li><a href=''><img alt='Home' height='30px' src='' width='30px'/></a></li> 

Solution :

Don't use any margins and stuff.

The problem is you have padding on your img.

set padding: 0; only to on the first li and it will be fine..

enter image description here

#wctopdropnav li:first-child { padding: 0; }

    CSS Howto..

    How to change the CSS on the last clicked div

    Bootstrap: Background image z-index to show it above bg color

    How to stop html/css object from resizing

    How to set dynamic responsive divs with only CSS (no javascript)?

    How can I use CSS styling in my GTK# application?

    How to remove div backgrounds?

    Wordpress: Have no idea how to change the navigation bar

    CSS HTML how to remove whole cell links in tables?

    How to Center Rotated text with CSS

    How to delete css right or bottom on drag

    How to fix the css red notification bubble

    How do I create a radial css3 border gradient shadow

    how to align button radio in css

    How to align

    and tags side-by-side?

    How can I create this shape in CSS? [closed]

    How to stop main scrollbar working when popup modal is activated, which needs also a scrollbar

    How do I continue to allow the user to click until a certain point?

    How to include stylesheet file only for one div?

    how to drag and drop a
    across the page

    TUMBLR CSS - How to move the caption on the permalink page to the right of the image

    how to give conditional comments in firefox for a single css style statement

    How to make footer responsive through CSS?

    How to css this little button next to