/    Sign up×
Community /Pin to ProfileBookmark

How do I get a page to open in the same size as the background picture

I use this code do display a background picture.

<STYLE TYPE=”text/css”>
BODY {background-image: url(backgrndspict.jpg);
background-repeat: no-repeat;
background-position: 1px 1px;}
</STYLE>

How do I get the window to open to the background picture size at the same time. (instead of having to drag open the window manually)

Thanks

Sandy

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@jbladeusMar 18.2008 — you can open a browser window by using javascript and specifying its dimensions.

Here is a detailed guide on window.open:

http://www.pageresource.com/jscript/jwinopen.htm
Copy linkTweet thisAlerts:
@motuitiauthorMar 18.2008 — Tried some of the samples given. No luck. I get a button and the window still doesn't open to the size of my background picture.

I'll reword my question:

This is not a button activated pop up.


From links elsewhere, or a google hit, I want anybody opening the webpage in question to have the window open to the size of my background picture (so they can see the fixed positioned text and graphics on the page).

Hope I am clear this time
Copy linkTweet thisAlerts:
@ray326Mar 18.2008 — In general there is no way to do this.
Copy linkTweet thisAlerts:
@jbladeusMar 18.2008 — Ok. What you need to do is to add an [B]onload event[/B] to generate your pop up. What will happen is that whoever visits your page will be presented a pop up window containing your graphic and content.

To see the syntax and examples of this event handler:

http://www.codetoad.com/javascript/miscellaneous/onload_event.asp

http://www.w3schools.com/jsref/jsref_onload.asp

http://www.devguru.com/technologies/ecmascript/QuickRef/evhan_onload.html
Copy linkTweet thisAlerts:
@jbladeusMar 19.2008 — yes, light/modal boxes are a better option these days since many browsers tend to block popups.
Copy linkTweet thisAlerts:
@jeremuMar 19.2008 — Did you need any more help?

Did we answer your question?
×

Success!

Help @motuiti spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...