The css style remains unchanged. If the order of the two div blocks is exchanged, they will be displayed one above the other and cannot be displayed side by side. why is that?
Jojo
Jojo 2019-03-23 14:11:40
0
2
1384

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>4. Two-column layout 2: left body adaptive_right column fixed width</title>

<style type="text/css">

.right {

width: 200px;

height: 600px;

float: right;

background-color: skyblue;

}


.main {

height: 600px;

background-color: cyan;

margin-right:200px;

}

</style>

</head>

<body>

<!-- DOM -->

<div class="main">left_main</div>

<div class="right" >Right side</div>

<!-- The css style remains unchanged. If the order of the two div blocks is exchanged, they will be displayed one above the other and cannot be displayed side by side. Why is this?-->



##</body>

</html>


Jojo
Jojo

reply all(1)
折断翼的鹰

The float you added before: right; just change it to float: left


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template