Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

CSS corner code?


ghost's Avatar
0 0

I'm setting up a website for a friend of mine, and I am not as familiar with CSS as I am with HTML and I"m trying to do what she wants. She wants there to be a background image the flows with the page, not stay stationary in the background, but continue on, but she also wants there to be an image in one of the corners. Does anyone have any idea on how I could do this?

Even if you don't know the code, would you know where I could find the code? Any help would be very much appreciated.

Thanks.


KvK's Avatar

KvK

Member
0 0

For a fixed background, you'd need to use the following CSS code…

background-image:url("example.png");
background-repeat:no-repeat;
background-attachment:fixed
}

Assuming you do want the corner picture to be fixed…

position:fixed;
top:5px;
left:5px;
">

If not, you can just remove "position:fixed;" ^_^


AldarHawk's Avatar
The Manager
0 0

Please give an example of the base HTML code you are trying to do and exactly what you are looking to build this as. I will help you if you can explain more of what you want it to look like (give examples of other sites that have a similar look) and I can get you the code thrown together in no time at all.


spyware's Avatar
Banned
0 0

OP: Google the title of your thread.


ghost's Avatar
0 0

KvK, I tried to use those codes, and I don't think that was exactly what I was looking for, or I just didn't put it in the right way. But as far as putting it in the corner, it was spot on and helped out a lot. Thank you so much.

Spyware, I did do that before I even posted this thread. The codes that I had acquired didn't let me do what I was trying to do. That is the only reason that I posted this.

This is what I've been working with this entire time. I'm trying to get the background right before I start doing anything to big.

<html>
<head>
<style type="text/css">
body
{
background-image: url('http://s954.photobucket.com/albums/ae26/Fre_Quen_C/th_animebackground3.png');
background-repeat: no-repeat;
background-attachment:fixed;
background-position: 00% 100%; 
}
</style>
</head>



<body background="http://s954.photobucket.com/albums/ae26/Fre_Quen_C/th_animebackground2.png">
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>
<h1>Hello World!</h1>


</td>

</body>

</html>

She wants the picture in the bottom left to stay there, but also have a different background behind it. So instead of it being white in the background, it would hold a picture or a color. When you scroll down, the picture in the bottom left needs to stay in place like it does, but the background that is behind it, what I'm trying to get, needs to flow with the page like they do in some MySpace backgrounds, except the picture needs to take up the whole background and not just repeat.

I really hope that I explained that right, and if not I apologize.

If I don't have that set up right, then could someone tell me? That'd be great. Thanks.


ghost's Avatar
0 0

spyware, I've known about that and I've tried that. Every time I use it, it still doesn't let me put up a background image. I've tried using the body tag to put in the image and even other tags that I know. I just can't get it to work for me.


AldarHawk's Avatar
The Manager
0 0

okay, so you are trying to get what exactly? I am still a little confused as to what you want? is your html web 2.0 compliant or only 1.0? I am trying to get a grip on exactly what you are looking to do here.

Sample pages PLEASE.


ghost's Avatar
0 0

I want the background to be like the background in this website:

http://www.grsites.com/archive/textures/view/source=archive/id=722/

But, I want to combine it so where it'll have an image in the lower corner like this:

http://w3schools.com/css/tryit.asp?filename=trycss_background-attachment

How the smiley image is up in the corner and doesn't move in the second link, I would like for it to be able to do that, but have a background image that flows at the same time like the first link.

Sorry that I didn't post those earlier, it took me a while to find them.


AldarHawk's Avatar
The Manager
0 0

okay, so let me get this right…you are trying to get a double background image…

listen to that carefully…..think it through…..what is wrong with the question you are asking?


ghost's Avatar
0 0

I've been trying to find a way to do it, and I suppose that there isn't one then? I know you can use double gradation, but from what I know about it, you can't do this with that…

And I guess there probably isn't any way to get around that either without frames?


ghost's Avatar
0 0

AldarHawk wrote: okay, so let me get this right…you are trying to get a double background image…

listen to that carefully…..think it through…..what is wrong with the question you are asking?

Lol. It sounds like you're speaking to your HTML101 class at a community college. "nooo… we don't use two backgrounds."


AldarHawk's Avatar
The Manager
0 0

you can do one thing I am trying to get you to think outside the box here mate. Think HARD! You will figure it out if you think web 2.0


spyware's Avatar
Banned
0 0

AldarHawk wrote: you can do one thing I am trying to get you to think outside the box here mate. Think HARD! You will figure it out if you think web 2.0

Wtf mate? There -is- no "web 2.0" in programming. Gtfo with your web 2.0.


KvK's Avatar

KvK

Member
0 0

Ah, I understand now. You can easily accomplish this feat using the CSS z-index feature. Here is an simple example created through the modification of my original corner icon code.

<img src="example.png" style="
position:fixed;
top:5px;
left:5px;
z-index: -1;
">

It's a useful feature and simple to understand, CSS' method of layering DOM objects, "z-index". Problem solved, I believe. :happy:


ghost's Avatar
0 0

Double image? Not sure if im correct but if what your wanting for the pic is it to REPEAT downward. like using repeat-y for the position? Also i suggest doing what alderhawk said and posting your code, if your not getting an image at ALL in the bg your making some kind of syntax error.


ranma's Avatar
Member
0 0

I think KvK pretty much got it. What the guy wants is to have a bg image and a static bar, sorta like Facebook has a static bar on the bottom.


ghost's Avatar
0 0

ranma wrote: I think KvK pretty much got it. What the guy wants is to have a bg image and a static bar, sorta like Facebook has a static bar on the bottom. So like a fixed bg image with a fixed bar as well i guess? Anywho, long as its figured out. :p


ranma's Avatar
Member
0 0

Sorta, but I don't think it was a fixed bg image, because that wasn't what his example showed us. But yeah, as long as it's fine.