CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 11/5/2007 8:35:03 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 6 Views: 659 Favorited: 0 Favorite
7 Items, 1 Pages 1 |< << Go >> >|
Elnath
Asp.Net User
How to stretch a background image?11/5/2007 8:35:03 AM

0

after solving my problem:
http://forums.asp.net/p/1176561/1989570.aspx

here comes my questions about page background:

1. is it possible to show a background image stretched for the page width and if so how?

if this is not possible how do i show an image as background, stretched to fill the page width, with its height in a correct ratio and being able to wirte my html upon it?


ty

ijoxley
Asp.Net User
Re: How to stretch a background image?11/5/2007 3:48:50 PM

0

You cannot stretch a background image as such, but you can set it to repeat either horizontally, vertically or both: 

background-position:repeat-x; /* to repeat horizontally */
background-position:repeat-y; /* to repeat vertically */
background-position:repeat; /* to repeat horizontally and vertically */

Hope this helps


Please mark helpful posts as "Answer"
Elnath
Asp.Net User
Re: How to stretch a background image?11/5/2007 4:35:21 PM

1

ijoxley:

You cannot stretch a background image as such, but you can set it to repeat either horizontally, vertically or both: 

background-position:repeat-x; /* to repeat horizontally */
background-position:repeat-y; /* to repeat vertically */
background-position:repeat; /* to repeat horizontally and vertically */

Hope this helps

afraid not, i really need something to show a stretched image on windows background to fit any resolution, is there a workaround of some sort?

ty

Elnath
Asp.Net User
Re: How to stretch a background image? (Solution)11/6/2007 4:33:42 PM

1

here is my solution, not so complex after all and will grant the best result possible in stretching a background image:

<div style="width:100%;height:100%;position:absolute;z-index:1;overflow:hidden;">
    <img border=0 src="Images/guild.jpg" width="100%" />
</div>

the <div> tag above is my "cheated" stretched background image, i set to hide the overflow as i wanted so but it can be left without boundaries. After this div ive started to write my page content, table holding controls, other table and all the needed elements of the page:

<table border=0 width="100%" height="75%" style="position:absolute;z-index:2;">

this worked for me as it is the very same effect i wanted to obtain.

hope this helps,

travich
Asp.Net User
Re: How to stretch a background image? (Solution)11/15/2007 5:58:27 PM

0

This ALMOST works in a content page -- the only thing is that it stretches outside of the content area, I am just not sure why. I am guess it's thinking it needs to stretch from that position plus the missing size of the menu, etc. If anyone knows I'd love to hear.

travich
Asp.Net User
Re: How to stretch a background image? (Solution)11/15/2007 5:59:33 PM

0

This ALMOST works in a content page -- the only thing is that it stretches outside of the content area, I am just not sure why. I am guess it's thinking it needs to stretch from that position plus the missing size of the menu, etc. If anyone knows I'd love to hear.

Elnath
Asp.Net User
Re: How to stretch a background image? (Solution)11/19/2007 8:43:30 AM

0

travich:

This ALMOST works in a content page -- the only thing is that it stretches outside of the content area, I am just not sure why. I am guess it's thinking it needs to stretch from that position plus the missing size of the menu, etc. If anyone knows I'd love to hear.

hi, i had your same problem having the image over windows borders, this was because i had set 100% on the image without inserting this tag inside my <div> in practice combining html and style we are telling to the browser something like this:

the "paint area" is 100% of the window are (visible part of it) inside this limit make a <div> wide 100% and inside this the image, while i set 100% to my image that doesnt pass my right border the image height in calculated in proportion and it can pass the lower border, to aavoid scrollbars, hide what is supposed to pass the borders: overflow:hidden;

if u have menu the code should be adapted, try to paste the example as shown to see if it is working and my solution is not limited only by the browser, if u can post some code maybe would be more easy to manage it out.

7 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
The Internet book: everything you need to know about computer networking and how the internet works Authors: Douglas Comer, Pages: 380, Published: 2006
Multimedia: making it work Authors: Tay Vaughan, Pages: 514, Published: 2006
Windows Vista: The Complete Reference Authors: John R. Levine, Margaret Levine Young, Pages: 733, Published: 2007
Mac OS X Tiger all-in-one desk reference for dummies Authors: Mark L. Chambers, Pages: 710, Published: 2005

Web:
How Do you Stretch a Background Image in a Web Page Stretching a background image seems like something that would be fairly easy to do, but until CSS 3 properties are more widely supported, we have to use a ...
How to stretch a background image. This is a test of a stretching background. If you resize this window, the background image should stretch or contract as desired. ...
FAQ - stretching a background image Our original background stretch coding was good, but not fully functional. As text went beyond the boundaries of the window, the background image was ended ...
HTML Stretch Background Image Learn the HTML code for stretching a background image. Can be used on the document's body, table, div tags and more.
How to stretch a background image? Aug 25, 2008 ... I posted an earlier question to the microsoft.public.inetserver.asp.general newsgroup asking how to set the background of a client-side ...

Body Background Image (CSS) and Themes - ng.asp-net-forum ... Is there a way I can have a background image on the page but still .... WordPress › Support » How to stretch background image in css I am ...
backgroud image auto-resize - ng.asp-net-forum.dotnetnuke I have a background image placed in the right pane of my DNN site. How do I get the background image to stretch with the module when the right pane gets ...

Videos:
Scaled background image makemenu can squeeze and stretch background images so that the entire image is visible in the frame. This menu uses a panoramic photograph.
TextBox & ComboBox with image as background Enhanced Controls that take a image as background. At this moment the image is stretched to fit the control.
Scaled background image makemenu can squeeze and stretch background images so that the entire image is visible in the frame. This menu uses a panoramic photograph.
Powerpoint: Project Part Two Episode 11 (of an 18-part series). This Nortel LearniT Tutorial is the second of three episodes that describes a hands-on project to help learn ...
Image fading with Fireworks In this video I show you how to fade an image into a background colour with Firework.






how to recreate the www.asp.net menu bar using a menu control?

sitemappath

menu

menu control and css

master page and resizing problem and the properties window

smartnavigation does not work!

hide asp:menuitem

master page and external css

i doubt this is possible but... load up a content page without showing the master page...

a cry for textview help.

entering a target into a sitemap

masterpage and themes problem working together

template advice needed

namingcontainer inside contentplaceholder

reg treeview node selection

master pages and base forms

treeview expand single path

new to asp.net, design issue

odd treeview state behavior... need help

problem in getting formatted treeview in ie 6.0

encryp & decrypt querystring

menu like http://www.trainingcamp.com/us/training/msft/sql2005_roadmap.asp

css background-image url location outside theme directory??

themes in master page

content between content areas

startingnodeoffset: why doesn't positive offsets work?

changing master pages at runtime

when is the viewstate available in a master page?

how can i access the property a control on a master page from the master page's code behind.

multiple sitemaps using the sqlsitemapprovider for different sections

   
  Privacy | Contact Us
All Times Are GMT