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 do I put several elements on the second row in a div

    How to disable the collapsing feature in twitter bootstrap 3?

    How to make dropdown menu disappear after a certain amount of time JavaScript

    how to change some css Properties according to text length

    How do I get two adjacent spans to display their text vertically?

    How to prevent CSS block elements from affecting parent inline-blocks

    jQuery UI sortable: how to leave css values of changed items untouched?

    How do i prevent my CSS affecting external plugins?

    HTML, CSS - image inside image, how to do that?

    How to give readmore for a text?

    How to use a custom toggle switch in jquery mobile

    How to add html in language file of opencart

    How do I confer CSS properties upon elements retrieved from $.ajax()?

    how to reverse CSS animation on second click with jQuery

    How to make a moving dashed border with CSS?

    How is CSS applied by the browser, and are repaints affected by it?

    On click show or hide the children links in javascript or jquery

    How to move this structure to the right without using float?

    HTML CSS - How to put button at the center of my page

    How to Style Specific Element On Hover With CSS?

    How do I auto play my slideshow

    How to get rid of an automatically generated span via CSS (un-display)?

    Mojolicious Tests: How to get the input value using css-selectors

    How to add another two full width sections below (CSS)

    How to build HTML email using CSS?

    How to style html element directly (inline)?

    How to style menu in CSS to look like a button

    How to use @page CSS in ASP.NET MVC View

    css: how to make the third div line up with the first div

    How to draw a responsive shape [closed]