473,385 Members | 1,472 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Background Positioning

Hello.

After getting great advice on positioning, I've edited my code and it's
looking more stable.

Now I need a little assistance with background image placement.

Please click on this link: www.ibtestsite.info

I've colored the background black and added a background image which is the
blue rectangular image that stretches the height of the screen (well at least
in Firefox it does). My goal is to have a centered page with no scroll bar
for up and down movement or left and right.

I've played around with body {....background-position: "whatever" px;} and
it's not doing anything.

Any advice on how to do this?
Dec 24 '07 #1
18 2579
In article <7d23aae2b99dc@uwe>, "LayneMitch" <u39402@uwewrote:
Hello.

After getting great advice on positioning, I've edited my code and it's
looking more stable.

Now I need a little assistance with background image placement.

Please click on this link: www.ibtestsite.info

I've colored the background black and added a background image which is the
blue rectangular image that stretches the height of the screen (well at least
in Firefox it does).
Not in my FF. 2.0.0.11 Mac The black appears at the bottom as
well as the sides.
My goal is to have a centered page with no scroll bar
for up and down movement or left and right.
That would surely be unwise? Have you got something against
people with small screens or who prefer not to use the height of
theirs?

O and by the way, have you an address for the undernourished girl
on the page? I have some nice potatoes here that I would like to
send her. I feel all motherly towards her and would like to
fatten her up for Xmas.

--
dorayme
Dec 24 '07 #2
dorayme wrote:
"LayneMitch" <u39402@uwewrote:
>My goal is to have a centered page with no scroll bar for up and down
movement or left and right.

That would surely be unwise? Have you got something against people
with small screens or who prefer not to use the height of theirs?
Layne, look at your site with Opera and press Shift-F11.

Or with Firefox and the Web Developer Toolbar installed:
Miscellaneous Small Screen Rendering

Your page is useless, I'm afraid...

--
-bts
-Friends don't let friends drive Vista
Dec 24 '07 #3
Beauregard T. Shagnasty wrote:
>Or with Firefox and the Web Developer Toolbar installed:
Miscellaneous Small Screen Rendering

Your page is useless, I'm afraid...

Okay....I just installed Web Developer Toolbar and hit Misc Small Screen
Rendering...

What does this mean?

How can I fix this if it matters?

--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/css/200712/1

Dec 24 '07 #4
In article <7d24dc7a4e102@uwe>,
"LayneMitch via WebmasterKB.com" <u39402@uwewrote:
Beauregard T. Shagnasty wrote:
Or with Firefox and the Web Developer Toolbar installed:
Miscellaneous Small Screen Rendering

Your page is useless, I'm afraid...


Okay....I just installed Web Developer Toolbar and hit Misc Small Screen
Rendering...

What does this mean?

How can I fix this if it matters?
Apart from any fancy device to help you see what other users are
seeing, you can use your own eyes and fingers. Just alter your
own browser width and use the text-size controls to see what
happens. Just remember that not everyone is seeing things at the
text and window sizes you are seeing.

--
dorayme
Dec 24 '07 #5
dorayme wrote:
>
Apart from any fancy device to help you see what other users are
seeing, you can use your own eyes and fingers. Just alter your
own browser width and use the text-size controls to see what
happens. Just remember that not everyone is seeing things at the
text and window sizes you are seeing.

Okay...

I see what you're saying.

Even though I'm new...my problem isn't with positioning...(anymore)

My problem is knowing how to properly display a background or how to display
a background image that I've designed in Photoshop. This is where advice
would greatly help.

I just experimented with resizing everything.

I got rid of all of my images and text and had just the blue rectangular
background. And I tried resizing by hitting Ctrl +... and nothing happened.
I'm thinking that this is what's effecting my entire design - the
unflexibility of my background.

Basically....how do you design a background graphic in photoshop and display
it properly as a background in CSS so resizing won't be a problem?

--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/css/200712/1

Dec 24 '07 #6
LayneMitch via WebmasterKB.com wrote:
Beauregard T. Shagnasty wrote:
>>Or with Firefox and the Web Developer Toolbar installed:
Miscellaneous Small Screen Rendering

Your page is useless, I'm afraid...

Okay....I just installed Web Developer Toolbar and hit Misc Small
Screen Rendering...

What does this mean?
It means your page is useless for anyone using small-screen browsers
(mobile phones, PDAs), or where CSS is not available. People on slow
connections who disable image loading don't see anything at all.

The page also looks pretty silly on my 1680x1050 widescreen with
maximized browser window (though I personally rarely do that).
How can I fix this if it matters?
Start over? Get some content (you don't have any), properly mark it up,
then worry about design and layout last.

Try this browser, too: http://offbyone.com/

--
-bts
-Motorcycles defy gravity; cars just suck
Dec 24 '07 #7
rf

"LayneMitch via WebmasterKB.com" <u39402@uwewrote in message
news:7d2529a6f6e05@uwe...
My problem is knowing how to properly display a background or how to
display
a background image that I've designed in Photoshop. This is where advice
would greatly help.
A background should be exactly that, a background. Something that covers the
canvas and over which you place your content.

You don't have a background. You have a big blue box containing some
"content" (the words on that image). That "content", apart from the fact
that it should be text, and not a picture of text, should be real content,
not part of something that is assigned as a background.

As soon as you start putting your "content" in a background image you are
forced to try and position your other content in relation to that "content".
This invaribly fails.

One major reason it fails is that by default background images do not print
(to save ink) so any "content" in the background image will not print.

Another major reason it fails (in this case) is that the google bot does not
read "content" in images. That "content" is invisible to google.
By the way the picture of the pretty girl is way too big. If you use some
proper image manipulation software you could compress it from the 163K it is
now down to something like 20K. Same with the other images. The entire page
is almost 300K. Way too big for what it is.

Oh, and *don't* use letter-spacing to space those two mirror images.

--
Richard.
Dec 24 '07 #8
LayneMitch via WebmasterKB.com wrote:
And I tried resizing by hitting Ctrl +... and nothing happened.
Nothing happened because you have no text, only images. (I assume the
Ctrl+ was in Firefox; that just resizes text.)

--
-bts
-Motorcycles defy gravity; cars just suck
Dec 24 '07 #9
rf wrote:
>You don't have a background. You have a big blue box containing some
"content" (the words on that image). That "content", apart from the fact
that it should be text, and not a picture of text, should be real content,
not part of something that is assigned as a background.
So what would be the best method to produce a blue box and have it a part of
a background? Should I even specify it as an image?
>By the way the picture of the pretty girl is way too big. If you use some
proper image manipulation software you could compress it from the 163K it is
now down to something like 20K. Same with the other images. The entire page
is almost 300K. Way too big for what it is.
Still working on the optimization.
>Oh, and *don't* use letter-spacing to space those two mirror images.
Understood...just thought it would be witty.

--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/css/200712/1

Dec 24 '07 #10
rf

"LayneMitch via WebmasterKB.com" <u39402@uwewrote in message
news:7d25e3bb85240@uwe...
rf wrote:
>>You don't have a background. You have a big blue box containing some
"content" (the words on that image).
So what would be the best method to produce a blue box and have it a part
of
a background? Should I even specify it as an image?
body {background-color: blue;} ?
>>By the way the picture of the pretty girl is way too big. If you use some
proper image manipulation software you could compress it from the 163K it
is
now down to something like 20K. Same with the other images. The entire
page
is almost 300K. Way too big for what it is.

Still working on the optimization.
You don't need to "work" on it :-)

Open picture.
Set compression level to, say, 50%.
Save picture.

--
Richard.
Dec 24 '07 #11
In article <7d2529a6f6e05@uwe>,
"LayneMitch via WebmasterKB.com" <u39402@uwewrote:
dorayme wrote:

Apart from any fancy device to help you see what other users are
seeing, you can use your own eyes and fingers. Just alter your
own browser width and use the text-size controls to see what
happens. Just remember that not everyone is seeing things at the
text and window sizes you are seeing.


Okay...

I see what you're saying.

Even though I'm new...my problem isn't with positioning...(anymore)

My problem is knowing how to properly display a background or how to display
a background image that I've designed in Photoshop. This is where advice
would greatly help.

I just experimented with resizing everything.

I got rid of all of my images and text and had just the blue rectangular
background. And I tried resizing by hitting Ctrl +... and nothing happened.
I'm thinking that this is what's effecting my entire design - the
unflexibility of my background.

Basically....how do you design a background graphic in photoshop and display
it properly as a background in CSS so resizing won't be a problem?
Well, my point about Ctrl + was simply to see what happened in
your previous design. I described what happened.

However, you need some text or inline images before "something
happens" Why with inline images but no actual text? Well, I guess
because they are in a line that *could* share text. The text
could be big or small depending. The invisible line blocks are
sized according to the biggest of any inline objects. The browser
just makes provision. If the text size is 100%, then pictures
that are taller than such normal text will make the line box
taller. But at some enlargement of the text (or potential text)
the line box will be taller than the pics.

The text size is sized according to what the author says it
should normally be or as it is overridden by the user wanting it
bigger or smaller.

You can see for yourself. Get rid of all your images bar one in
the previous url you provided. Put:

<div class="linkbkgd" style="background: white;">
<img src="images/Link-Background.gif" alt="">
</div>

And watch the action. The space under the image is for the
descenders in text.

As for displaying bg images, that is simple enough. Read the
htmldog link I gave. Read what rf says.

You may be thinking you can stretch a bg image or make it grow
with the growth in an element (as happens in text size
adjustments). But you can't. You can give an illusion by having a
bg repeat itself, or you can have one so big that some of it
(though not all) will practically fill the element.

--
dorayme
Dec 24 '07 #12
In article <NC******************@news-server.bigpond.net.au>,
"rf" <rf@invalid.comwrote:
Still working on the optimization.

You don't need to "work" on it :-)

Open picture.
Set compression level to, say, 50%.
Save picture.
Perhaps he meant other things by optimization besides byte
juggling. Lie making the text bigger or getting rid of it.

But in case OP does mean byte reduction, you do not quite need to
go down to 50%. Here it is at 80% jpged and under 10KB:

http://netweaver.com.au/alt/pics/bac...less_bytes.jpg

--
dorayme
Dec 24 '07 #13
rf wrote:
>body {background-color: blue;} ?

The background color is already specified as black. I'm looking for a blue
image inside of a black image and all of it is considered a background.
>Open picture.
Set compression level to, say, 50%.
Save picture.
Dorayme is right...I am talking about bytes. But anyhow I'll get every image
fixed to make for a faster download.

--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/css/200712/1

Dec 24 '07 #14
rf wrote:
>>>You don't have a background. You have a big blue box containing some
Okay...
Can anyone explain to me why this worked...?

<html>
<head>
<style type="text/css">

body {
background-repeat: no-repeat;
background-position: 180px;
}

</style>
</head>

<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0" background="images/Background.gif">

</body>
</html>

--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/css/200712/1

Dec 24 '07 #15
Actually, it didnt' work very well.

When I resize the text on my page the page starts to break up. I'm using a
combination of absolute and relative positioning which I've been told is okay
to do.

Also when I resize the images, the background still remains at a fixed size.
Still trying to find a solution to this.

I've been told that the correct way to display a background is by:

body {background:#fff url(images/picture.jpg) no-repeat center center}

This info is coming from guys who are good at design. So I still don't
understand why it's not working for me.

You can click on this link to see the updates thus far.

www.ibtestsite.info

--
Message posted via http://www.webmasterkb.com

Dec 24 '07 #16
Oh yeah...

How is this guy (http://portfolio.dreamshock.com/grimshaws/) getting his
background's displayed/positioned properly or designed without using
Photoshop? His background is resizing nicely with all of his text and images
resizing proportionately as well.

--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/css/200712/1

Dec 24 '07 #17
dorayme wrote:
>Are you seeing what everyone else can see? There is no resizing
of any background image because there are no bg images. Turn off
all the styles and you will still see the images.
I turned off all of the styles and I saw the images. I hit view source and I
saw that he does specify a bg image:

<body bgcolor="#FFFFFF" text="#000000" background="images/pagebackground.gif"
leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

>Have you tried following the advice I gave you earlier at all:

"[no] fix for all this.
[go] over some of the material at:
http://www.htmldog.com/guides/

Generally follow the advice there except use HTML 4.01 Strict as
your doctype and adjust accordingly.
Make a background and fancy look to your page the *very last
thing* you do, not the first."
Thanks again. I will visit the site and review the html/css rules...actually
before I do anything else with design.

Thanks for your expertise.

--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/css/200712/1

Dec 24 '07 #18
In article <7d2f3e7201ba9@uwe>,
"LayneMitch via WebmasterKB.com" <u39402@uwewrote:
dorayme wrote:
Are you seeing what everyone else can see? There is no resizing
of any background image because there are no bg images. Turn off
all the styles and you will still see the images.

I turned off all of the styles and I saw the images. I hit view source and I
saw that he does specify a bg image:

<body bgcolor="#FFFFFF" text="#000000" background="images/pagebackground.gif"
leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
You said to look at:

http://portfolio.dreamshock.com/grimshaws/

I went to it and in the source it says:

<BODY BGCOLOR=#FFFFFF>

not

<body bgcolor="#FFFFFF" text="#000000"
background="images/pagebackground.gif"
leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

In this site's css it has the following bullshit:

body {

font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
scrollbar-face-color:#4B4B4B;
scrollbar-highlight-color:#D4D4D4;
scrollbar-3dlight-color:#373737;
scrollbar-darkshadow-color:#000000;
scrollbar-shadow-color:#808080;
scrollbar-arrow-color:#FFFFFF;
scrollbar-track-color:#E0E0E0;
}

There is no bg image there either.

Got to rush now and wrap more presents and stuff and get ready to
get blind rotten drunk, to disgrace myself more than for the rest
of the year combined and like that... Merry Xmas mate!

--
dorayme
Dec 24 '07 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Michael Rozdoba | last post by:
I've had some trouble getting IE to behave in respect of applying absolute positioning to a span on an a:hover. I can get it to work, but I don't understand why certain code causes it to fail to...
8
by: Serge Hartmann | last post by:
hi there, I created two different backgrounds for the same page to obtain a (fake) left margin and a (true) right margin. -> left background, defined in body section, aligned bottom and with...
8
by: johkar | last post by:
I have two problems I cannot work out in the following tab code with Netscape 6. Problems are marked with all cap comments. One is that the background image is not shown in NS 6 (two places in...
3
by: andrew | last post by:
Hi there, I've fought with this problem before in IE and "solved" it by setting various block elements to have 100% width, but now that won't work for me and I'm just curious in general as to...
3
by: Viken Karaguesian | last post by:
Hello all, I need somehelp with background tiling. I have a sneaking suspicion that what I want to do is not possible, but I'll ask anyway. :>) First some background: Here's the site in...
16
by: Walker | last post by:
I have a span containing two words. Eg. <span>Avant Garde</span> Using CSS, I pad the text to the right and assign a background-image. Eg. span { padding: 0 3px 0 11px; background:...
3
by: seamlyne | last post by:
The first method I ever used for multiple state buttons was to create a graphic for each button for each state: AboutUs_on, AbooutUs_over, AboutUs_out, etc. That works great when there are just a...
16
by: stevedude | last post by:
CSS newbie again. I have a problem trying to get coffee mug images within anchor tags to center with my link text for a vertical list menu. If I use the horizontal/vertical properties of...
10
by: VividWeb | last post by:
Hi. I am relatively new to CSS and HTML but have a basic understanding of most things. One of my backgrounds is not positioning correctly in IE 7 or AOL. The background behind the content...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.