Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 07-02-2009, 03:21 PM   #1 (permalink)
Registered User
 
ggormsen's Avatar
 
Join Date: Nov 2008
Location: Phx AZ USA
Posts: 38
OS: XP SP3 / Vista Ult Home x86

My System

[SOLVED] Expandable Background

Hello,
I have a small problem with the site I am building.
http://gcgcg.com/besttest/index.html
http://gcgcg.com/besttest/code/best.css
I will be putting it onto the main site when I am finished with it.

I need the div background image to
A) Resize (I solved that)
B) Get longer when there is a lot of content, or a small screen that cannot fit the content in it.

Also, if anyone knows how to make text scale in size, I would really appreciate that code as well.
Thanks!
ggormsen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 07-02-2009, 04:09 PM   #2 (permalink)
Registered User
 
FredT's Avatar
 
Join Date: Nov 2007
Posts: 388
OS: Mac OS X 10.5.7 and XP SP2


Re: Expandable Background

That images/bordersback/backgroundgradient_03.jpg image is perfect to be tiled. For that whole table where all the ab ab ab's are, use:

style="background-image: url(images/bordersback/backgroundgradient_03.jpg); background-repeat: repeat-y;"

in the tag. Take away that <img src="images/bordersback/backgroundgradient_03.jpg"> with the 100% width and height.

Does this make sense to you?

Also, your buttons are really messed up on Safari. Screenshot attached.
Attached Images
File Type: jpg Picture 1.jpg (101.2 KB, 3 views)
FredT is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-02-2009, 04:19 PM   #3 (permalink)
Registered User
 
ggormsen's Avatar
 
Join Date: Nov 2008
Location: Phx AZ USA
Posts: 38
OS: XP SP3 / Vista Ult Home x86

My System

Re: Expandable Background

Thank you but that won't quite work.
The reason that I have the image widened instead of using a background is because I want it to look the same in all resolutions. Right now, it looks exactly the same in 800x600 as it does in 2048x1024 (except for the text, which I need to figure out how to auto-scale text)
ggormsen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-04-2009, 01:05 PM   #4 (permalink)
Registered User
 
FredT's Avatar
 
Join Date: Nov 2007
Posts: 388
OS: Mac OS X 10.5.7 and XP SP2


Re: Expandable Background

Hmm, I'm having trouble thinking of an HTML/CSS solution right now... are you open to using Javascript?
FredT is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-05-2009, 02:30 PM   #5 (permalink)
Registered User
 
ggormsen's Avatar
 
Join Date: Nov 2008
Location: Phx AZ USA
Posts: 38
OS: XP SP3 / Vista Ult Home x86

My System

Re: Expandable Background

sure, I'm open to anything.
ggormsen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-05-2009, 08:23 PM   #6 (permalink)
God (TSF Enthusiast)
 
ahmorrow's Avatar
 
Join Date: May 2009
Location: Jeffersonville, IN
Posts: 678
OS: Ubuntu 9.04 [Jaunty Jackalope]

My System

Send a message via AIM to ahmorrow Send a message via Yahoo to ahmorrow
Re: Expandable Background

window.screen.availWidth

This property gets the users current screen width. Use this in an if statement. Say the width is 2048 you can set the pages font to be larger than the one already made for 800x600

HINT: You can use the operators below to make the font size increase automatically (if they have an odd screen resolution like 4096x???).

if(screen.availWidth > 800)
{code here;}


>
<
>=
<=
ahmorrow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-05-2009, 08:29 PM   #7 (permalink)
God (TSF Enthusiast)
 
ahmorrow's Avatar
 
Join Date: May 2009
Location: Jeffersonville, IN
Posts: 678
OS: Ubuntu 9.04 [Jaunty Jackalope]

My System

Send a message via AIM to ahmorrow Send a message via Yahoo to ahmorrow
Re: Expandable Background

Accidental posting of the same thing... I swear this NEVER happens ;-)

Last edited by ahmorrow; 07-05-2009 at 08:30 PM. Reason: Stupid thing posted twice lol
ahmorrow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-06-2009, 08:42 AM   #8 (permalink)
Registered User
 
FredT's Avatar
 
Join Date: Nov 2007
Posts: 388
OS: Mac OS X 10.5.7 and XP SP2


Re: Expandable Background

Let me know if this works for you:

Step 1: Paste the following script in the head of your document:
Code:
<script type="text/javascript">
function resizeBackground(){
	var content = document.getElementById('table');
	var backimg = document.getElementById('backimg');
	if (longdiv.style.pixelHeight) {
		backimg.height = longdiv.style.pixelHeight;
	} else {
		backimg.height = longdiv.offsetHeight;
	}
}
</script>
Step 2: Add onresize="resizeBackground()" to the <body> tag:
Code:
<body onresize="resizeBackground()" onload="MM_preloadImages('images/menubuttons/buttonson_01.png','images/menubuttons/buttonson_02.png','images/menubuttons/buttonson_03.png','images/menubuttons/buttonson_04.png','images/menubuttons/buttonson_05.jpg','images/menubuttons/buttonson_06.jpg')">
Step 3: Change the <img> tag for the background image to:
Code:
<div id="backgrad"><img src="images/bordersback/backgroundgradient_03.jpg" width="100%" id="backimg" /></div>
Good luck!
FredT is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-06-2009, 11:29 PM   #9 (permalink)
God (TSF Enthusiast)
 
ahmorrow's Avatar
 
Join Date: May 2009
Location: Jeffersonville, IN
Posts: 678
OS: Ubuntu 9.04 [Jaunty Jackalope]

My System

Send a message via AIM to ahmorrow Send a message via Yahoo to ahmorrow
Re: Expandable Background

Oh sure, Freddy just HAS to outdo me ;-) lol
ahmorrow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-23-2009, 01:44 PM   #10 (permalink)
Registered User
 
FredT's Avatar
 
Join Date: Nov 2007
Posts: 388
OS: Mac OS X 10.5.7 and XP SP2


Re: Expandable Background

Woops, just realized this won't work... if you ever come back to this.

The following script is correct.
Code:
<script type="text/javascript">
function resizeBackground(){
	var content = document.getElementById('table');
	var backimg = document.getElementById('backimg');
	if (content.style.pixelHeight) {
		backimg.height = longdiv.style.pixelHeight;
	} else {
		backimg.height = longdiv.offsetHeight;
	}
}
</script>
Followed the link and it looks like you gave up on the background anyway.

Last edited by FredT; 07-23-2009 at 01:46 PM.
FredT is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-23-2009, 02:01 PM   #11 (permalink)
Registered User
 
ggormsen's Avatar
 
Join Date: Nov 2008
Location: Phx AZ USA
Posts: 38
OS: XP SP3 / Vista Ult Home x86

My System

Re: Expandable Background

Thanks!
We ended up going another direction because I just couldn't make anything work.
Thank you everyone for your time
ggormsen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-23-2009, 02:01 PM   #12 (permalink)
God (TSF Enthusiast)
 
ahmorrow's Avatar
 
Join Date: May 2009
Location: Jeffersonville, IN
Posts: 678
OS: Ubuntu 9.04 [Jaunty Jackalope]

My System

Send a message via AIM to ahmorrow Send a message via Yahoo to ahmorrow
Re: Expandable Background

I compliment you and what do you do Freddy? This is unacceptable! I want your junior detective badge on my desk in 5 minutes! This is an outrage I tell ya, an outrage! lol
ahmorrow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 03:47 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85