This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Seitenbreite ändert sich
#1
Hallo,


ich habe ein Problem mit einem Javascript und der Programmierer, welcher es erstellt hat, ist nicht mehr erreichbar und ich habe da nicht wirklich eine Ahnung.

Das Problem müsste im Bereich des folgenden Codes liegen:

var parent = this._src_element.parentElement;
// the trap is a relative div, we wrap them around
// all content in the node of the input
// because the suggest is absolute and is bound to the next
// higher element with position relative. this is perfect position
var trap_div_width = 0;
// very importent, limit the width of div,
// else the suggest move to wrong position on browser zoom!
do{
// lets search the first offsetWidth in our parents
// that are not zero
trap_div_width = parseInt(parent.offsetWidth);
parent         = parent.parentElement;
}
while(parent != null && trap_div_width == 0);
if(trap_div_width == undefined){
trap_div_width = "";
}
else{
trap_div_width = "width: " + trap_div_width + "px;";
}
...
var new_content  = "<div style=\"z-index: "+zIndex+";position: relative; margin: 0; padding: 0; " + trap_div_width + "\">";

Das trap_div_width verändert seinen Wert, wenn ich einen Reload der Seite mache.
Normal ist es bei 837 und dann erhöht sich der Wert auf 1247.

Das Problem ist, dass wenn der Wert sich auf 1247 erhöht, kommt der seitliche Scrollbalken.

Kann mir hier jemand einen Tipp oder besser noch eine Lösung mitteilen?

Wenn noch weitere Informationen benötigt werden, bitte melden.

Gruß
Andreas
Zitieren
#2
igendwie bringt mir das gar nichts.
Ich weiß nicht wofür das ist und so weiter.
Hast du das Online ?
Kannst du irgendwie eion Funktionierendes Beispiel posten wo man das problem sehen kann und testen ?
Als Lösung markieren Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste