473,394 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

layer moved when browser resized or resolution changed...

Hello Everyone,

I need help to make my layers (DIV tags) in the page not moved when users change browser size or have other resolution. I got some ideas about make script that check the browser size and make this sync with the layer size, but after trying many codes and many ways to integrate that i didn't get to fix this problem.

any help with an example will be appreciated.

Thanks in advance,
Jun 13 '07 #1
4 1398
shoonya
161 100+
Hello Everyone,

I need help to make my layers (DIV tags) in the page not moved when users change browser size or have other resolution. I got some ideas about make script that check the browser size and make this sync with the layer size, but after trying many codes and many ways to integrate that i didn't get to fix this problem.

any help with an example will be appreciated.

Thanks in advance,
use onresize=<function which places att things perfectly>
can u paste the piece of code here ??

shoonya
Jun 14 '07 #2
acoder
16,027 Expert Mod 8TB
or you could set the position to "absolute" instead of "relative".
Jun 14 '07 #3
thanks shoonya for your reply.

This was the code of the layer ( it was keyboard layer so i pasted here only the beginnings of the layer code, the rest is the divs of the keys of the keyboard ) and some css of the page.

Expand|Select|Wrap|Line Numbers
  1. <div onselectstart="return false" style="visibility:hidden; position:absolute; z-index:100; top:325px; left:198px; background:#fff; text-align:center; -moz-user-select:none; border:1px solid #000; width:271px; padding:1px 0 0 0;" id="keyboard" class="all_off">
  2.  
Expand|Select|Wrap|Line Numbers
  1.  
  2. body {
  3.     margin-left: 0px;
  4.     margin-top: 10px;
  5.     margin-right: 0px;
  6.     margin-bottom: 0px;
  7. }
  8.  
  9. div {
  10. position:relative;
  11. float:left;
  12. }
  13.  
  14.  
the problem was not in absolute or relative because i'm always use absolute because the layer will have a top and left style.
Jun 14 '07 #4
acoder
16,027 Expert Mod 8TB
You have float set to "left" - it should be 'none'.
Jun 14 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: PAD | last post by:
I have written a javascript routine that populates a parent document with a series of <iframe>s. Each <iframe> receives its contents from a series of separate smaller HTML files. Of course my NN...
2
by: Matt | last post by:
I use CSS for positionings in my html page, the problem is when i resize the browser, the positions are offset. Here's the code, any ideas?? <html> <head> <style type="text/css">
2
by: Despoina | last post by:
I have created a web site, where I use a dropdown menu when the mouse goes over an image. My problem is that when I resize the browser, the menu's position changes relatively and goes way to the...
87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
2
by: Dan | last post by:
Hello, I am just now converting from the world of DOS. Making simple VB.NET apps was easier than I expected. Now I need some control over the window that the app is running in. Can a VB.NET...
8
by: nescio | last post by:
hello, i have a script that finds the x and y from the mouse position, this works fine. but now i have an image in a layer : <div id='someLayer'> <img src='someImage.jpg'> </div>
1
by: Rich | last post by:
Hello, I have a child form in a parent MDI form. The childform is being shrunk and cannot be resized when screen resolution is 800x600. The end user who uses my app cannot see stuff on the...
12
by: TS | last post by:
If I was to have my biz layer ask the data layer to load a particular object based on key field info i pass to it, and it cannot create the object becaues it isnt' in the Db, should the data layer...
9
by: SAL | last post by:
Hello, I have a Dataset that I have table adapters in I designed using the designer (DataLayer). I have a business logic layer that immulates the DataLayer which may/may not have additional logic...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.