using css, how to position image so when resizing window, image will not move

Tags: css,image,positioning

Problem :

i was wondering if anyone could help me with css. ive been stuck on using background-attachment:fixed;

it just doesn't seem to work. im basically trying to make an image a link, but i don't want it to scroll so i made it into a bg image. i have...

<a href="/contents/selection" title= "Manage selection." id="f-logo" style="background-image:url({{STATIC_URL}}images/flowsTab_normal.png);background-attachment:fixed;background-repeat:no-repeat;display:block; height: 90px;width: 130px;"> </a>

when i take out background-attachment:fixed, i see the image, but once i put it in, it disappears. i deliberately left out text between the anchor tags so the image is like a clickable link : D

ive been super stuck. help would be much appreciated. thanks! css syntax is confusing...

Solution :

Simply add a character to your anchor tag. A non breaking space will do the trick.

See my example on the very useful tool,

    CSS Howto..

    How can I change the numbering of an order list's items?

    Captions after 1st slide doesnt show for flexslider

    How to solve css issue to display image caption?

    How to achieve this button-border effect with CSS? (image included)

    How to stop background layering with CSS?

    How to add hover text on D3 disign?

    How to get html data-attribute value in css regular expressions

    How to animate an icon for with CSS?

    jqueryui menu's submenu — how to keep in front

    How to set fit-content for width in right side - dynamic content width

    How to Fix Collapsing Top and Bottom Margins?

    CSS - How to use “vertical-align : middle” with a table near an image?

    How to reapply new text format in CSS after removing format initially

    How to accomplish onHover event without a second image

    How to make DIV constantly display text on click?

    how to pass context value to css

    How to Make Inline SVG Scale to Parent Element with CSS

    R markdown: how to change style with internal css?

    How can I get facing html elements to left-align and right-align, respectively, preferably using CSS?

    How Can I get my DL to style properly?

    Can someone explain in detail how the clear works in this code?

    How to prevent fixed image from scrolling down?

    How to use another brackets/tabs policy for my CSS?

    How to remove white border from blur background image

    How to toggle between display:none and display:block

    How to get website to show better in iPhone and iPad? (width too little)

    How to get css3 ribbon on both sides of element

    How to disable temporary cursor with javascript?

    How not to display / filter out special characters? (CSS or Javascript)

    (some) background images won't show up in IE7 or IE8