Forums
This topic is locked
DMX 2004: Designing page with div&css
Posted 12 Nov 2003 10:04:49
1
has voted
12 Nov 2003 10:04:49 Turo Jokinen posted:
Hello people!I am really frustrated because I have been trying to design a page using div and css. Everything goes smoothly until I have to make a link column and a content column in #main div which is absolutely positioned. The link column and the content column should be side by side but in my case the content column is under the link column.
Here is the code (really simple version and I inserted the css into the page for this example):
<pre id=code><font face=courier size=2 id=code>
%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "www.w3.org/TR/html4/loose.dtd">
html>
head>
title>Untitled Document</title>
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
style type="text/css">
!--
div#main {
background-color: #CC6666;
position: absolute;
width: 96%;
left: 2%;
top: 30px;
right: 2%;
height: 1px;
}
div#left_column {
margin: 10px;
width: 200px;
background-color: #CCCCCC;
}
div#left_column a {
display: block;
}
div#content {
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin-left: 240px;
background-color: #999999;
}
-->
/style>
</font id=code></pre id=code>
<pre id=code><font face=courier size=2 id=code>
/head>
body>
div id="main">
div id="left_column">
a href="#">Link 1</a>
a href="#">Link 2</a>
a href="#">Link 3</a>
a href="#">Link 4</a>
/div>
div id="content">
h1>Feature Title </h1>
p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec molestie.
Sed aliquam sem ut arcu. Phasellus sollicitudin.
/p>
/div>
/div>
/body>
/html>
</font id=code></pre id=code>
Could anyone help me to get the clumns side by side???
p.s. the code is missing the < sign because i could not make the code availabel in prewiev in any other way. The <pre id=code><font face=courier size=2 id=code></font id=code></pre id=code> did not seem to work.
Regards,
Turo
Replies
Replied 15 Nov 2003 13:01:44
15 Nov 2003 13:01:44 Dave Thomas replied:
not really upto scratch with the new css layouts, but maybe you should have the div id=content inside the main div along with the link div, rather than having them seperate.
other than that, just use a css template page in dwmx to show you the code, then scrap it and do your own <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Regards,
Dave
UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro
other than that, just use a css template page in dwmx to show you the code, then scrap it and do your own <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Regards,
Dave
UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro
Replied 02 Dec 2003 02:48:25
02 Dec 2003 02:48:25 alex billerey replied:
Try giving the nested div the position of absolute, and set it's left/top properties as well.
HTH
Alex
HTH
Alex
