Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Web Coding

Reply
 
LinkBack Thread Tools
Old 09-08-09   #1 (permalink)
Networking Nut
 
CSU_ComputerMajor's Avatar
 
intel ati

Join Date: Jul 2006
Location: Georgia
Posts: 787

Rep: 43 CSU_ComputerMajor is acknowledged by some
Unique Rep: 34
Trader Rating: 1
Default urgent help needed with web page coding

im trying to do some coding on a website/page. im trying to put a picture as the sites background but it keeps tiling it but i want it to be centered and stretched. i dont want the picture to be tiled. i cant figure out what to do. ive resized the picture and everything but it keeps tiling the picture. what do i do??? heres the code for it.

/* background for the lounge */
div#pagecontent{
visibility:show!important;
background-image:url("http://i637.photobucket.com/albums/uu96/djdark_2009/lovins%20coding/peaches-1.jpg")!important;
background-repeat:repeat!important;
background-attachment:fixed!important;
background-position:center center!important;
/* changes outer scroll-bars */
scrollbar-base-color:#9A2EFE;
scrollbar-arrow-color:black;
scrollbar-track-color:#AC58FA;
scrollbar-shadow-color:#7401DF;
scrollbar-lightshadow-color:#E3CEF6;
scrollbar-darkshadow-color:#380B61;
scrollbar-highlight-color:blue;
scrollbar-3dlight-color:white;
__________________
"Come to the Blue side, we have cookies!"

System: My First Dual Core
CPU
Pentium D 940 @ 3.2GHz
Motherboard
ECS w/ i945G chipset
Memory
2x512 Super Talent PC5300 DDR2
Graphics Card
Sapphire x1650XT 256Mb GDDR3
Hard Drive
80GB Seagate Barracuda 7200.10
Sound Card
Realtek 5.1 HD Audio
Power Supply
CoolMax 400W 29A Dual 12v Rails
Case
Stock
CPU cooling
Stock
GPU cooling
Copper Heatpipes with fan
OS
Windows XP
Monitor
19" Philips Brilliance Flat Screen CRT =)
CSU_ComputerMajor is offline   Reply With Quote
Old 09-08-09   #2 (permalink)
Personae Non Gratae
 
Kryten's Avatar
 
intel nvidia

Join Date: Feb 2009
Location: West Yorkshire, England
Posts: 3,609

Rep: 167 Kryten is acknowledged by manyKryten is acknowledged by many
Unique Rep: 125
Trader Rating: 4
Default

background-repeat:none;

That would make it not repeat. I don't think there is a way to make it fill the page or automatically resize without jscript.

Link to the page in question?

And you should probably host the image on your host, not photobucket....
__________________
There's a certain series of books that EVERYONE should read Discworld.
31,352++ signatures. Sign this Dedicated Servers petition for Modern Warfare 2
Quote:
"Do not spoil what you have by desiring which you have not; but remember that what you have now was once among the things you only hoped for."

System: Spare Head 2
CPU
Intel Core 2 Quad Q9450@ 3.6ghz
Motherboard
Asus Striker II Formula 780i
Memory
4x1GB OCZ 900mhz 4-4-4-12
Graphics Card
2x 8800GT SLI
Hard Drive
2X250 SG, 2X320 WD = RAID 0 + 1x1TB F1 Spinpoint
Sound Card
Creative Labs XtremeGamer
Power Supply
OCZ 600w StealthStreamX
Case
Antec 182b
CPU cooling
TRUE + 120mm Tri-Cool
GPU cooling
2x120mm Tri-Cool's strapped on top
OS
Windows 7 Pro x64
Monitor
20inch Samsung 2032BW
Kryten is offline Overclocked Account   Reply With Quote
Old 09-08-09   #3 (permalink)
Networking Nut
 
CSU_ComputerMajor's Avatar
 
intel ati

Join Date: Jul 2006
Location: Georgia
Posts: 787

Rep: 43 CSU_ComputerMajor is acknowledged by some
Unique Rep: 34
Trader Rating: 1
Default

Quote:
Originally Posted by Kryten View Post
background-repeat:none;

That would make it not repeat. I don't think there is a way to make it fill the page or automatically resize without jscript.

Link to the page in question?

And you should probably host the image on your host, not photobucket....
http://www.fubar.com/lounge/68727
__________________
"Come to the Blue side, we have cookies!"

System: My First Dual Core
CPU
Pentium D 940 @ 3.2GHz
Motherboard
ECS w/ i945G chipset
Memory
2x512 Super Talent PC5300 DDR2
Graphics Card
Sapphire x1650XT 256Mb GDDR3
Hard Drive
80GB Seagate Barracuda 7200.10
Sound Card
Realtek 5.1 HD Audio
Power Supply
CoolMax 400W 29A Dual 12v Rails
Case
Stock
CPU cooling
Stock
GPU cooling
Copper Heatpipes with fan
OS
Windows XP
Monitor
19" Philips Brilliance Flat Screen CRT =)
CSU_ComputerMajor is offline   Reply With Quote
Old 09-08-09   #4 (permalink)
Intel Overclocker
 
RapidFireGT's Avatar
 
intel nvidia

Join Date: Apr 2007
Location: STL
Posts: 663

Rep: 40 RapidFireGT is acknowledged by some
Unique Rep: 34
Trader Rating: 0
Default

Try deleting "background-repeat:repeat" - I think that is what is making it become tiled.

Now as for stretching it, I don't know if it'll do that automatically or not.

Some additional advice: try downloading the Firebug add-on for firefox. You can look at any website (including your own) and edit the code on the fly to see what it would look like. Likewise, it has an "inspect" mode when you can move your mouse over any part of the page and it'll automatically show you the code that is referring to whatever it is that your mouse is hovering over.

System: My Baby
CPU
Q6600 @ 3 GHz (9x333)
Motherboard
EVGA 750i FTW SLI
Memory
4GB OCZ Platinum (2x2) DDR2 1000
Graphics Card
EVGA 8800GT Superclocked
Hard Drive
Seagate 250GB 7200 RPM 16MB
Sound Card
Onboard
Power Supply
OCZ GameXStream 700W
Case
NZXT Alpha Black ATX Mid
CPU cooling
Zalman 9500
GPU cooling
Stock
OS
Vista Business x64
Monitor
Hanns-G JW199D 19" WS
RapidFireGT is offline   Reply With Quote
Old 09-08-09   #5 (permalink)
Personae Non Gratae
 
Kryten's Avatar
 
intel nvidia

Join Date: Feb 2009
Location: West Yorkshire, England
Posts: 3,609

Rep: 167 Kryten is acknowledged by manyKryten is acknowledged by many
Unique Rep: 125
Trader Rating: 4
Default

I think what you can do is make the image a completley crazy high resolution and have it go no bigger than the resolution of the user's browser. But that requires jscript and I avoid jscript at all costs.
__________________
There's a certain series of books that EVERYONE should read Discworld.
31,352++ signatures. Sign this Dedicated Servers petition for Modern Warfare 2
Quote:
"Do not spoil what you have by desiring which you have not; but remember that what you have now was once among the things you only hoped for."

System: Spare Head 2
CPU
Intel Core 2 Quad Q9450@ 3.6ghz
Motherboard
Asus Striker II Formula 780i
Memory
4x1GB OCZ 900mhz 4-4-4-12
Graphics Card
2x 8800GT SLI
Hard Drive
2X250 SG, 2X320 WD = RAID 0 + 1x1TB F1 Spinpoint
Sound Card
Creative Labs XtremeGamer
Power Supply
OCZ 600w StealthStreamX
Case
Antec 182b
CPU cooling
TRUE + 120mm Tri-Cool
GPU cooling
2x120mm Tri-Cool's strapped on top
OS
Windows 7 Pro x64
Monitor
20inch Samsung 2032BW
Kryten is offline Overclocked Account   Reply With Quote
Old 09-08-09   #6 (permalink)
Networking Nut
 
CSU_ComputerMajor's Avatar
 
intel ati

Join Date: Jul 2006
Location: Georgia
Posts: 787

Rep: 43 CSU_ComputerMajor is acknowledged by some
Unique Rep: 34
Trader Rating: 1
Default

Quote:
Originally Posted by RapidFireGT View Post
Try deleting "background-repeat:repeat" - I think that is what is making it become tiled.

Now as for stretching it, I don't know if it'll do that automatically or not.

Some additional advice: try downloading the Firebug add-on for firefox. You can look at any website (including your own) and edit the code on the fly to see what it would look like. Likewise, it has an "inspect" mode when you can move your mouse over any part of the page and it'll automatically show you the code that is referring to whatever it is that your mouse is hovering over.
tried that and tried changing it to repeat:none still not working. page is linked above
__________________
"Come to the Blue side, we have cookies!"

System: My First Dual Core
CPU
Pentium D 940 @ 3.2GHz
Motherboard
ECS w/ i945G chipset
Memory
2x512 Super Talent PC5300 DDR2
Graphics Card
Sapphire x1650XT 256Mb GDDR3
Hard Drive
80GB Seagate Barracuda 7200.10
Sound Card
Realtek 5.1 HD Audio
Power Supply
CoolMax 400W 29A Dual 12v Rails
Case
Stock
CPU cooling
Stock
GPU cooling
Copper Heatpipes with fan
OS
Windows XP
Monitor
19" Philips Brilliance Flat Screen CRT =)
CSU_ComputerMajor is offline   Reply With Quote
Old 09-08-09   #7 (permalink)
Networking Nut
 
CSU_ComputerMajor's Avatar
 
intel ati

Join Date: Jul 2006
Location: Georgia
Posts: 787

Rep: 43 CSU_ComputerMajor is acknowledged by some
Unique Rep: 34
Trader Rating: 1
Default

Quote:
Originally Posted by Kryten View Post
I think what you can do is make the image a completley crazy high resolution and have it go no bigger than the resolution of the user's browser. But that requires jscript and I avoid jscript at all costs.
how do i do that? im not familiar with jscript...
__________________
"Come to the Blue side, we have cookies!"

System: My First Dual Core
CPU
Pentium D 940 @ 3.2GHz
Motherboard
ECS w/ i945G chipset
Memory
2x512 Super Talent PC5300 DDR2
Graphics Card
Sapphire x1650XT 256Mb GDDR3
Hard Drive
80GB Seagate Barracuda 7200.10
Sound Card
Realtek 5.1 HD Audio
Power Supply
CoolMax 400W 29A Dual 12v Rails
Case
Stock
CPU cooling
Stock
GPU cooling
Copper Heatpipes with fan
OS
Windows XP
Monitor
19" Philips Brilliance Flat Screen CRT =)
CSU_ComputerMajor is offline   Reply With Quote
Old 09-08-09   #8 (permalink)
New to Overclock.net
 
UndertheGun's Avatar
 
Join Date: Sep 2009
Posts: 447

Rep: 55 UndertheGun is acknowledged by some
Unique Rep: 42
Trader Rating: 0
Default

Is this on topic? Link.
Quote:
How do I stop my background image from tiling?

Short Answer
There is no standards-based way of doing this in HTML. Some people create a large background (say, 1600x1200 pixels) and place the desired image in the appropriate place. Keep in mind that this "technique" has some serious drawbacks.

Long Answer
There is no way, using standard HTML, of doing it. That is, this ability is not defined in any of the HTML specs. In fact, the HTML 3.2 Reference Specification for the BODY tag defines the BODY tag's BACKGROUND attribute as specifying a URL for an image that will be used to tile the document background (emphasis added).

What some do to get around this problem is to create a huge background image (1600x1200 perhaps) that has the image they want seen in the top left corner (or around there) and the rest is some neutral color that complements the image. Keep in mind, though, that doing this has some serious drawbacks, not the least of which is the increase in download time. Other problems include additional overhead (memory), rendering time, and the hard drive space required to store the large image in cache.

It is possible to do this using Cascading Style Sheets (CSS1). This is accomplished via the background-repeat property and would be specified as:

BODY { background: url(bgimage.gif); background-repeat: no-repeat }

On a similar note, Microsoft Internet Explorer allows you to set your background as a "watermark" by adding the following to your document's BODY tag:

BGPROPERTIES=FIXED

As described on Microsoft's website, (190K document) this property "Specifies a 'watermark,' which is a background picture that does not scroll. The background image remains fixed behind any scrolling foreground information." Note that, despite this, your background image will still be tiled. It just won't scroll.

Keep in mind, though, this property will only work for those using MSIE. People using other browsers will still see your scrolling background (assuming that image loading is enabled and the browser can support images).
UndertheGun is offline   Reply With Quote
Old 09-08-09   #9 (permalink)
Personae Non Gratae
 
Kryten's Avatar
 
intel nvidia

Join Date: Feb 2009
Location: West Yorkshire, England
Posts: 3,609

Rep: 167 Kryten is acknowledged by manyKryten is acknowledged by many
Unique Rep: 125
Trader Rating: 4
Default

Oh, yeah, it's no-repeat...not none... Opps!
__________________
There's a certain series of books that EVERYONE should read Discworld.
31,352++ signatures. Sign this Dedicated Servers petition for Modern Warfare 2
Quote:
"Do not spoil what you have by desiring which you have not; but remember that what you have now was once among the things you only hoped for."

System: Spare Head 2
CPU
Intel Core 2 Quad Q9450@ 3.6ghz
Motherboard
Asus Striker II Formula 780i
Memory
4x1GB OCZ 900mhz 4-4-4-12
Graphics Card
2x 8800GT SLI
Hard Drive
2X250 SG, 2X320 WD = RAID 0 + 1x1TB F1 Spinpoint
Sound Card
Creative Labs XtremeGamer
Power Supply
OCZ 600w StealthStreamX
Case
Antec 182b
CPU cooling
TRUE + 120mm Tri-Cool
GPU cooling
2x120mm Tri-Cool's strapped on top
OS
Windows 7 Pro x64
Monitor
20inch Samsung 2032BW
Kryten is offline Overclocked Account   Reply With Quote
Old 09-08-09   #10 (permalink)
Networking Nut
 
CSU_ComputerMajor's Avatar
 
intel ati

Join Date: Jul 2006
Location: Georgia
Posts: 787

Rep: 43 CSU_ComputerMajor is acknowledged by some
Unique Rep: 34
Trader Rating: 1
Default

Quote:
Originally Posted by Kryten View Post
Oh, yeah, it's no-repeat...not none... Opps!
now how do i resize the picture to like 1600x1200 so it covers the entire page?
__________________
"Come to the Blue side, we have cookies!"

System: My First Dual Core
CPU
Pentium D 940 @ 3.2GHz
Motherboard
ECS w/ i945G chipset
Memory
2x512 Super Talent PC5300 DDR2
Graphics Card
Sapphire x1650XT 256Mb GDDR3
Hard Drive
80GB Seagate Barracuda 7200.10
Sound Card
Realtek 5.1 HD Audio
Power Supply
CoolMax 400W 29A Dual 12v Rails
Case
Stock
CPU cooling
Stock
GPU cooling
Copper Heatpipes with fan
OS
Windows XP
Monitor
19" Philips Brilliance Flat Screen CRT =)
CSU_ComputerMajor is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 06:16 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.15937 seconds with 8 queries