значения свойства:
* {
margin
:
0
;
padding
}
.main {
height
200px
width
950px
position
absolute
top
50%
left
margin-top
-100px
margin-left
-475px
.wrapper {
198px
float
border
1px
solid
#808080
.empty {
50px
.a, #div
1
, .b, .c, .d, .e {
background-color
#7092BE
.a {
relative
right
auto
#div
{
.c {
-50%
.d {
fixed
10px
.e {
100px
* { margin: 0; padding: 0; } .main { height: 200px; width: 950px; position: absolute; top: 50%; left: 50%; margin-top: -100px; margin-left: -475px; } .wrapper { width: 198px; height: 198px; float: left; border: 1px solid #808080; } .empty { width: 50px; height: 200px; float: left; } .a, #div1, .b, .c, .d, .e { width: 50px; height: 50px; background-color: #7092BE; } .a { position: relative; right: auto; } #div1 { position: relative; } .c { position: relative; right: -50%; } .d { position: fixed; right: 10px; } .e { position: absolute; right: 100px; }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
link
href
"css/style.css"
rel
"stylesheet"
script
type
"text/javascript"
src
"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
></
</
body
div
class
"main"
"wrapper"
"a"
"empty"
id
"div1"
"b"
"c"
"d"
"e"
/*JavaScript*/
document.getElementById("div1").style.right = "25px";
/*jQuery*/
$(document).ready(function () {
$(".b").css({ "right": "-25px", "position": "relative" });
});