How do I add a link to my CSS background?


Tags: html,css,background,hyperlink

Problem :

I am having trouble with add a link to my css background. I know it is not possible but I am wondering how I would add it through my html. this is my css

`.home-featured.wall {
padding: 20px 0;
background: rgb(0, 0, 0) url(images/bg-pattern-black.png);
background-image: url(http://viralcentro.com/wp-content/uploads/2013/05/NBA-ad-Viral-Centro.png);
background-repeat: no-repeat;
background-position: center top;
position: relative;
text-shadow: none;
height: 730px;`

My site is http://viralcentro.com/ and the background I am trying to add a link to is the basketball one.

Thanks in advance.



Solution :

Hmm well why don't you try making the image local and putting it in a folder with your other images on your server. It may not be working because its taking to long to process the image. Also try using quotes when you link to images.

.home-featured.wall {
padding: 20px 0;
background: rgb(0, 0, 0) url('images/bg-pattern-black.png');
background-image: url('dir_imgs/NBA-ad-Viral-Centro.png'); /* replace dir_imgs with your     folder name*/
background-repeat: no-repeat;
background-position: center top;
position: relative;
text-shadow: none;
height: 730px;

    CSS Howto..

    How to change the button color when it is active using bootstrap?

    How to get jQuery UI tabs element panels and set visibility on some of them?

    How to make a ruler scale in HTML and CSS

    How to send web page in email body with css

    how to switch between left and right css rules using Jquery?

    How can I properly display my divs in masonry style using flex?

    Best practice: how to name css default state? [closed]

    How to write css rule with variable to change font-size?

    How to reuse a css background sprite for icons of different sizes?

    How i can make a dynamic css class without use of id?

    How to remove all inherited CSS formatting for a table?

    How to add padding to the cells of a table with CSS [closed]

    How to center a div and keep the alignment to its nested floating divs?

    How to convert a .PNG file into a source code that can be stored into mysql and called up via CSS as “png”

    How to align HTML elements from bottom to top?

    How to center two square blocks in page?

    How to apply css style to jquery effect

    How to Change Error Message Css Style (Parsley)

    Design Issue: How to design a webpage that should show 11 elements with a description for each elements? [closed]

    how to apply div on hover my table td

    How to I make the width of my CSS wrapper relative to the size of the monitor?

    CSS - How can I set the content to attr() but when attribute isn't available, set it to 0 or another?

    How do I create a radial css3 border gradient shadow

    How to change CSS of child element inside parent
    element Using jQuery onclick event?

    How To Add Static Image to Table

    How can I target an id=“last_name[]_field” with css

    css: how to position a X sign at the top right corner of the img element

    How to hide a parent div if an inner div has a certain class, with javascript

    How can i make a div to slide in from right side to left?

    How I can get an Image height and divide it by 2 using Jquery