/    Sign up×
Community /Pin to ProfileBookmark

How to add link to a background image

I have added a image before a div named **route-container** through css
`.route-container::before {
content: “”;
display: block;
background: url(‘https://example.com/banner/728×90.jpg’) no-repeat;
width:100%;height:100px;margin-top:30px;margin-left:15px;
}`

which shows the image before the div.
I want to give a link to image through css by clicking the image it takes the user to another tab, is it possible?

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@WebnyxaNov 28.2019 — #range-logo {

background-image:url(http://ran.ge/content/uploads/2009/11/logo-trimmed.png);

display:block;

height:100px;

width:460px;

}

this code may help you in geting what you want
Copy linkTweet thisAlerts:
@VITSUSANov 29.2019 — it is really helpful :)
Copy linkTweet thisAlerts:
@shobhaauthorNov 29.2019 — @Webnyxa#1611262 Thank u
×

Success!

Help @shobha spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...