Position im Bildschirm bestimmen

Status
Nicht offen für weitere Antworten.
Hallo,
ich würde gerne ein HTML Element genau unten rechts anzeigen lassen...
Eigentlich ja kein Problem, aber nicht jeder hat die gleiche Bildschirmauflösung -.-...
Sollte einfach ein paar Pixel vom Rand entfernt sein...
Etwa so:
CSS.jpg


MFG
 
Hi,
Code:
#box {
position:absolute;
right:50px;
bottom:50px;
width:100px;
height:60px;
background:#000;
}
funktioniert mit allen Bildschirmauflösungen.
 
Danke, hat geklappt,
aber als heute ein paar Zeilen mehr auf der Seite waren konnte man nach unten scrollen
und da habe ich gemerkt das das HTML Element immernoch an der Stelle ist,
was auch logisch ist...
Aber wie kann ich das realisieren das das trotz des Runterscrollens immernoch auf der Position bleibt?


MFG
 
Hi,

vielleicht hilft dir da dieses Modell weiter:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta name="author" content="Maik">
<title>tutorials.de | demo_Firephoenix93</title>

<style type="text/css">
<!--
* {
margin:0;
padding:0;
}

html,body {
height:100%;
}

div#wrap {
position:relative;
min-height:100%;
height:auto !important;
height:100%;
}

div#box {
position:absolute;
right:10px;
bottom:10px;
width:100px;
height:40px;
background:#000;
color:#fff;
}
-->
</style>

</head>
<body>

<div id="wrap">
     <p>dummy text</p>
     <!-- Ab hier wird der nachfolgende Inhalt zunächst auskommentiert -->
     <!--<p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>
     <p>dummy text</p>-->

     <div id="box">box</div>
</div>

</body>
</html>
Oder schwebt dir eher eine fixe Positionierung, wie beispielsweise http://www.cssplay.co.uk/layouts/fixed.html, vor?
 
Status
Nicht offen für weitere Antworten.
Zurück