Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fix page to screenresolution 1

Status
Not open for further replies.

FrithM

Technical User
Joined
Oct 22, 2001
Messages
14
Location
NL
Hello everybody,

i hope someone can help me with this.
I made a website with a fixed jpg as background. So it is not possible to let the size be automatic on the viewer his/her screen. But what i want is that for people with big screens, the website comes in the middle of the screen. Is this possible??
The temporaly adress of the site is :

Hope someone can help me out :)

Tnx in advance
 
so to make your background center make a style for body...so in DW you would go to add a new style>for a html tag (the second option i believe) then you would go to background and there you will specify the image and for horizontal and vertical positioning you would choose middle and center. Also for repeat chose no repeat.

to make your whole site centered make one table 100% width by 100% height and chose the verticla and horizontal alignment as middle and center and then go from there.

hope this helps [soapbox]
sleep is good
 
I'd use several backgrounds. Thsi script only does two, but you can add more.


<Script Language=&quot;JavaScript&quot;>

var scrw = screen.Width

if ( scrw <= &quot;800&quot; )
{
document.write(&quot;<body background=regbg.jpg>&quot;)
}
else
{
document.write(&quot;<body background=largebg.jpg>&quot;)
}
</Script>
 
Both thanx for your reply !

Im still not succeeding, i tried both methods.
I think it is the problem that i dont use a background. The image on the back is a jpg in cell, and i worked with layers and iframes.

Do you maybe have another solution??
 
heres one....go with my second solution and make one table 100% height and width
then then the td tag put background=&quot;yourimage&quot;
that will give you the image in your center cell...Just make sure your cell is the same size as your image and from there just split the cell up accordingly and you can keep the look....
another suggestion is to use Div layers and change the positioning from absolute to relative (for NN compatibility). [soapbox]
sleep is good
 
I see what you want to do now.

I'd do this.

(1) Make a table 100% width. Drop your large image into it. Center it horizontally.

(2) Get the project 7 extensions. Snap layers, and redoit.

(3) Run the redoit extension.

(4) Use the snap layers extension to line your layers up in relation to the main background image.

Its a little bit of work, but it will work cross browser and multi resolution, even when screen is resized.

 
First, TNX TO ALL OF YOU GUYS ! ! great the support.

i tried all the advice. where i am now :
I have an image in the center, so far so good.

But snapping the layers to the image is not working, because i get everytime on events the only posibility : &quot; onmouseover&quot;.
How can i change that ? or am i doing something wrong??

I'm sorry i am asking so much :'(
 
Deecee ? what about the tag?
td tag put background=&quot;yourimage&quot;
I tried 100 of times, but he is not displaying my image :
background=&quot;new_project.jpg&quot;

Can you help me out with that? Because i understand that i dont have any trouble with the layers if i use this way???

Tnx
 
Can't you click on the down arrow beside on mouse over, and change it to onload?
 
no, if i try, the only option is onmouseover ......
really strange
 
<td height=&quot;100&quot; width=&quot;100&quot; background=&quot;yourimage&quot;>blah</td>
make sure you get your image location right
ie...if you image is in a folder called pics and that folder is in the root directory then you would have to have pics/imagename instead of yourimage. [soapbox]
sleep is good
 
You have DM set for version 3 browsers.

Change it to netscape4
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top