...

View Full Version : Text and image flow



doctrin13th
11-14-2009, 04:50 AM
I have a table 2 rows

row 1 have 2 cols
i merged the cols in the second row

Col 1 in row 1 is section A
Col 2 in row 1 is Section B
Merged col in row 2 is Section C

I put paragraph 1 in Section A, and image in B and paragraph 2 in C.

Recently I turned to div layout,as I've learned that tables are bad practice.

How can I make the same output using div. With the text and image flow together even if the window is resized, the image and texts will auto-adjust?

BubikolRamios
11-14-2009, 05:06 AM
post code or link to what you have.

Excavator
11-14-2009, 08:15 AM
Hello doctrin13th,
Maybe something like this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
font: 100.1% "Comic Sans MS";
background: #FC6;
}
* {
margin: 0;
padding: 0;
border: 0;
outline: 0;
}
#container {
margin: 30px auto 0; /*centers and puts top margin on #container*/
background: #999;
overflow: auto; /*clears the float*/
font-size: 0.8em;
}
#logo {
height: 306px;
width: 183px;
margin: 0 20px 0 0;
float: right;
background: #f00; /*for testing*/
}
#post {
margin: 0 auto; /*centers #post*/
background: #ccc;
overflow: auto;
font-size: 0.8em;
}
#container p, #post p {
margin: 20px 20px 20px 0;
}
</style>
</head>
<body>
<div id="container">
<img src="image001.jpg" alt="logo" id="logo" />
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<!--end container--></div>
<div id="post">
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<!--end post--></div>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum