значения свойства:
* {
margin
:
0
;
padding
}
body {
background-color
#FFFFE0
.main {
height
600px
width
900px
position
absolute
top
50%
left
margin-top
-300px
margin-left
-450px
.
, .
bottom
{
280px
border
1px
solid
#808080
#F0FFFF
middle
40px
.img-
, .img-
right
, #div
1
, .image-
200px
250px
5px
float
.text {
text-align
justify
278px
428px
center
* { margin: 0; padding: 0; } body { background-color: #FFFFE0; } .main { height: 600px; width: 900px; position: absolute; top: 50%; left: 50%; margin-top: -300px; margin-left: -450px; } .top, .bottom { height: 280px; width: 900px; } .bottom { border: 1px solid #808080; background-color: #F0FFFF; } .middle { height: 40px; width: 900px; } .img-left, .img-right, #div1, .image-right { height: 200px; width: 250px; padding: 5px; } .img-left { float: left; } .img-right { float: right; } .text { text-align: justify; } .left, .right { height: 278px; width: 428px; border: 1px solid #808080; background-color: #F0FFFF; float: left; } .center { height: 278px; width: 40px; float: left; }
<!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"
"top"
"left"
id
"div1"
img
"img/hawaii1.jpg"
p
"text"
I was dreaming about Hawaii. I was dreaming about my holiday. In
my dream, I was on the beach in Hawaii. The hot sun was shining on
my face. The sound of the sea was all around me.
But it was a dream. Three weeks ago, I had been lying on a beach
in Hawaii. But I was not in Hawaii now. I was dreaming in my office
in Los Angeles. I had returned from my holiday and there was no
work for me.
"center"
"right"
"image-right"
"img/hawaii2.jpg"
"middle"
"bottom"
"img-left"
"img-right"
work for me. Nobody wanted to hire me. I went to my office every
day, but the telephone didn't ring. So I slept in my chair and I dreamt
about Hawaii.
I was dreaming a wonderful dream. The sun was hot. The noise of
the sea was loud and there was a beautiful woman standing next to
me. The woman looked around my office. She looked at the old
furniture and the dirty windows. She looked at the broken blind and
the plastic coffee cups in the waste bin. Then she looked at me. I
hadn't shaved. And my suit and hair were untidy. The woman didn't
speak.
/*JavaScript*/
document.getElementById("div1").style.cssFloat = "left";
/*jQuery*/
$(document).ready(function () {
$(".image-right").css({ "float": "right" });
});