The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Adding a fixed image into CSS?

4 posters

Go down

Solved Adding a fixed image into CSS?

Post by ℋunni June 10th 2012, 5:04 am

I have an image that is fixed on the bottom right side of my site that is beneath the forum itself but above the background (using z-index and placed within a widget). Because it's currently placed in a widget, as mentioned above, and I'm not too fond of that because all widgets disappear when viewing a profile, I'd like to know:

Is there a way I can add this image and its properties to my CSS sheet?


Last edited by ℋunni on June 12th 2012, 11:43 pm; edited 1 time in total
ℋunni
ℋunni
Forumember

Female Posts : 150
Reputation : 4
Language : English

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by ℋunni June 11th 2012, 9:06 am

Bump~
ℋunni
ℋunni
Forumember

Female Posts : 150
Reputation : 4
Language : English

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by Ryanette June 12th 2012, 12:59 am

Yeah, just make a CSS rule with it.
Ryanette
Ryanette
Forumember

Male Posts : 135
Reputation : 2
Language : English (British)
Location : England, United Kingdom

http://www.devforumz.com

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by ℋunni June 12th 2012, 7:46 am

[Link Removed by Poster]

The yellow-haired character at the bottom left.

It's in a widget and I'd like for it to be in the CSS instead.


Last edited by ℋunni on June 12th 2012, 11:46 pm; edited 1 time in total
ℋunni
ℋunni
Forumember

Female Posts : 150
Reputation : 4
Language : English

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by Ryanette June 12th 2012, 5:05 pm

I see where you're coming at now, as you don't have templates.
You'll need to use javascript for it, lol.
Code:

var derp = document.createElement('yellow-guy');
derp.innerHTML = "<img src="http://i.imgur.com/6eoSt.png" style="position:relative;top:50px;float:left;">;
document.getElementById('body').appendChild(derp);

I haven't tried it on any forum version, so it's guess work
Ryanette
Ryanette
Forumember

Male Posts : 135
Reputation : 2
Language : English (British)
Location : England, United Kingdom

http://www.devforumz.com

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by ℋunni June 12th 2012, 11:41 pm

Solved.

Thank you both!

EDIT: What I did instead, that I should have done before (don't know why I didn't) was I made an ID in the CSS as:
Code:
#backgroundimg {
z-index: -999;
position: fixed;
bottom: 0px;
left: 0px;
}

Then in the site description, I added in:
Code:
<div id=backgroundimg><img src=http://i.imgur.com/6eoSt.png></div>


Last edited by ℋunni on June 12th 2012, 11:45 pm; edited 1 time in total
ℋunni
ℋunni
Forumember

Female Posts : 150
Reputation : 4
Language : English

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by PurpleDucks June 12th 2012, 11:42 pm

WYHAT THE HELL Neutral Neutral Neutral Neutral Neutral Neutral Neutral
PurpleDucks
PurpleDucks
New Member

Posts : 23
Reputation : 1
Language : English
Location : shut up

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by PurpleDucks June 12th 2012, 11:45 pm

ewww its gay
PurpleDucks
PurpleDucks
New Member

Posts : 23
Reputation : 1
Language : English
Location : shut up

Back to top Go down

Solved Re: Adding a fixed image into CSS?

Post by Sissy June 12th 2012, 11:47 pm

Content Removed
Sissy
Sissy
New Member

Posts : 21
Reputation : 1
Language : Spanish English, Hacker

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum