Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Need Help With JPEG Background
austiniskoge
post Jun 16 2006, 02:19 PM
Post #1


Premium Member
Group Icon

Group: Members
Posts: 216
Joined: 7-March 05
From: Carrollton, TX
Member No.: 2,953



I'm just starting to design my website.

So far, it looks okay.
Here's a basic rundown:

index.html is divided into two frames: menubar.htm (25%) and "mainwindow" (75%).

The menu bar has about 7 images which, when clicked, open other .htm files in "mainwindow".
I want a background image "tsmg2.jpg" (which is in the same folder as everything else) to be behind the 7 link- images.

The image works, I know- I can code <img src="tsmg2.jpg"> and it will display it.

However, I want it as the background.

I've been coding <background="tsmg2.jpg"> and putting that right under the first <html> opening tag.

Why doesn't it show "tsmg" as the background for the other images?

-EDIT-

okay, I found a css tutorial off google.

now, I need to know how to have only one image (not tiled)

I tried:

<style type="text/css">
body
{
background-image:
url('tsmg2.jpg')
background-repeat: no-repeat;
}
</style>

with no luck...

and can I have the browser auto-size it to fit the frame?
I know different browsers display different looks...

This post has been edited by austiniskoge: Jun 16 2006, 02:39 PM
Go to the top of the page
 
+Quote Post
Houdini
post Jun 16 2006, 02:43 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



That belongs in the body tag
HTML
<html>
<head>
<title>My New Site</title>
</head>
<body backgound="tsmg2.jpg"><!--all your other stuff you want-->
Your content here
</body>
</html>


This post has been edited by Houdini: Jun 16 2006, 02:44 PM
Go to the top of the page
 
+Quote Post
austiniskoge
post Jun 16 2006, 02:49 PM
Post #3


Premium Member
Group Icon

Group: Members
Posts: 216
Joined: 7-March 05
From: Carrollton, TX
Member No.: 2,953



Okay. That works to place the image in the frame.

But what about not tiling it?

It's a small image, so after the first one displays at the top of the frame, it continues with more all the way down.

Isn't it like:

<body background="tsmg2.jpg" position="center">

except that's like horizontal center, and I just want one vertically centered image.
Go to the top of the page
 
+Quote Post
Houdini
post Jun 16 2006, 05:33 PM
Post #4


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



You would need to use CSS like
HTML
body{background-image: url(tsmg2.jpg);
repeat:no-repeat;
background-attachment:fixed}

You might want to enlarge the image or it might work if you tried
HTML
body {background-image:url(tsmg2.jpg);
background-position:100% 100%}
Go to the top of the page
 
+Quote Post
mpinsky
post Jun 16 2006, 10:04 PM
Post #5


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 41
Joined: 14-June 06
From: United States
Member No.: 13,934



I had this very same problem as I have the exact same basic frame setup as you described except that my background is to the left, but while your background may remain un-tiled, if your text exceeds the length of your picture, the picture will also go up with the text as well instead of remaining fixed.

In my honest opinion, something like that usually looks nicer if the background remains fixed while only the text and body images scroll (but that just might be me). smile.gif

So, here's what I did for mine (I changed it so it would fit yours):

HTML
<style type="text/css">body{background:url(tsmg2.jpg) fixed no-repeat center}</style>


Hope that made sense... unsure.gif

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. background sound(4)
  2. Html Background Tutorial(2)
  3. How Do I Keep A Background On My Site(14)
  4. What Is The Best Size To Make A Background In Photoshop?(6)
  5. Locking Background Image To Browser Borders.(7)


 



- Lo-Fi Version Time is now: 5th December 2008 - 01:35 AM