Hello I am trying to make a webpage without using tables. However i need 2 colums with the first having text and the second pictures.
As of right now the pictures in the second column affect the text position in the first.
How can I properly set this up?
I also know its because of the css display: table-cell;
html code
css
As of right now the pictures in the second column affect the text position in the first.
How can I properly set this up?
I also know its because of the css display: table-cell;
html code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="" />
<title>Yoga Lotus</title>
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="base">
<div id="container">
<div id="row">
<div id="LeftTXTBox">
<h4>Middle Col</h4>
<p>Lorem ipsum dolor sit Aene id quam. Sed neq</p>
</div>
<div id="rightCol"><img src="/images/box.jpg" alt="Floating" width="260" height="200" class="IMG" />
<img src="/images/relax-box.jpg" alt="Pose" width="260" height="200" class="IMG" /></div>
</div>
</div>
<div id="footer"> <a href="#">home</a> <a href="#">act</a> <a href="#">sch</a> <a href="#">scribe</a> <a href="#">statement</a> </div>
<div id="subFoot" align="center"> setup box </div>
</div>
</body>
</html>
css
Code:
@charset "UTF-8";
/* CSS Document */
#base {
clear:left;
z-index:2;
position:relative;
width:90%;
height:489px;
margin:0 auto;
}
#container {
z-index:3;
max-width:1100px;
padding:0;
border: 1px solid black;
width: 90%;
margin: auto;
display: table;
}
#row {
display: table-row;
}
#rightCol {
width:266px;
background:#FEE;
padding:1em;
display: table-cell;
}
#LeftTXTBox {
padding: 1em;
display: table-cell;
max-width:1000px;
min-width:521px;
background-color:#ebead5;
}
.bottomPanel {
margin-top:5px;
width:259px;
height:196px;
}
.IMG {
text-align:center;
padding:1em;
}
#dynFooter a {
text-decoration:none;
color:white;
}
#subFooter {
font-family:Arial, Helvetica, sans-serif;
text-transform:uppercase;
font-weight:bold;
color:#60635b;
}
body {
background-color:#C1FFFF;
background-image:url(/yoga/images/background.png);
background-position:center top;
background-repeat:no-repeat;
font-family:Arial, Helvetica, sans-serif;
}
/*Start Footer Nav bar*/
#footer {
text-align:center;
margin-top:15px;
margin-bottom:15px;
}
#footer a {
display:inline-block;
text-decoration:none;
text-transform:uppercase;
color:#60635b;
padding:5px;
}
#footer a:hover {
font-weight:bold;
}
#dynFooter {
margin-top:5px;
height:33px;
padding-top:18px;
padding-left:15px;
padding-right:15px;
font-size:14px;
color:white;
font-weight:bold;
overflow:hidden;
}
Last edited: