/    Sign up×
Community /Pin to ProfileBookmark

Background images in Divisions

I was just wondering if it is possible to put background images in divisions. I know you can do it with tables. Is it possible?

thanx
danam22315

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@snuffle6Oct 19.2011 — Yes you can. You have to use the css background property for it.

For external or embedded use:[CODE].divid { background-image: url('imagesrc.jpg');}[/CODE]

for inline styles use:[CODE]<div style="background-image: url('imagesrc.jpg');" >div contents</div>[/CODE]

To learn more about this go to http://www.w3schools.com/css/css_background.asp
Copy linkTweet thisAlerts:
@wdevelopersOct 31.2011 — Yeah there css to put background image for the div...

like if you would give any class or id in the class
[code=html]<div class="bg"></div>[/code]
and than make a css class for this
[code=html].bg{background-image:url(images/image.png);}[/code]
and its there
×

Success!

Help @danam22315 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.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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