| Coding Forum Problems with your code? Let's hear about it. |
09-29-2004, 03:25 PM
|
#1 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
How Do I Do This?
This is my latest design for my site. After I figure this out, I have to fit it into the php template. I am trying to create a page that is tables without having tables at all in the design. I have only seen very simple designs as tutorials on css design with divs My problem is that when I get the left col div to scroll the content when it is longer than the height of the div the alignment of the divs is lost and they are placed so as to stagger left and right content. I want left and right content to top align. If one is longer than the other I have created a special div that fixes that so the next set will be top aligned - it is like a table row tag in html. Any ideas on how to make the divs line up in the left col. I have not tried it out in IE, only Firefox and Mozilla. Thanks in advance for your assistance.
This is the code for the page:
Code:
<HTML>
<head>
<link rel="stylesheet" href="styles2.css" type="text/css">
</head>
<BODY>
<div id="frame">
<div id="header">header area
<div id="table">
<div id="lcol">
<div class="center">content here content here contebnt here content here content here
<div class="left">content left here
<div class="right">content right here
<div class="center">content here content here content here content here content here
<div class="left">content left here
<div class="right">content right here
<div class="center">content here content here contebnt here content here content here
<div class="left">content left here
<div class="right">content right here
</div>
<div id="rcol">
<div style="padding-left: 20px;">
<iframe id="scrollinghead" src="smiley.html" width="180px" height="25px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no">
<iframe id="scrollingtext" src="smileys.html" width="180px" height="150px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no">
</div>
</div>
</div>
<div id="footer">footer text</div>
</div>
</BODY>
</HTML>
This is the code for the css.:
Code:
body {
margin: 0;
border: 0;
padding: 0;
font-size: 12pt;
background: url(../images/bckgr-tile.jpg) #b20000 repeat;
line-height: 130%;
color: #000000;
}
div#lcol div.center {
padding-left:20px;
padding-right:20px;
max-width:500px;
text-align:justify;
position:static;
vertical-align:top;
clear:both;
}
div#lcol div.left {
padding-left:20px;
max-width:240px;
text-align:justify;
position:static;
vertical-align:top;
}
div#lcol div.right {
padding-right:20px;
max-width:240px;
text-align:justify;
margin-left:280px;
float:left;
position:static;
vertical-align:top;
}
#frame {
width:760px;
margin-right:auto;
margin-left:auto;
padding:0px;
}
#header {
background-color: #b20000;
color: #FF0000;
padding-left: 20px;
padding-bottom: 10px;
font-weight: bold;
}
#table {
background-color: #faafb6;
vertical-align:top;
}
#lcol {
overflow:auto;
float:left;
position: absolute;
height:450px;
width:550px;
vertical-align:top;
}
#rcol {
vertical-align: top;
background-color: #b20000;
color: #ffffff;
width:200px;
position: absolute;
float:left;
left:560px;
}
#footer {
background-color: #b20000;
color: #FF0000;
padding-left: 20px;
padding-bottom: 10px;
font-weight: bold;
clear:both;
}
|
|
|
09-29-2004, 04:36 PM
|
#2 (permalink)
|
|
No Longer Here
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
Latest Blog: None
|
I'm not sure I understand the question.
|
|
|
09-29-2004, 07:09 PM
|
#3 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
The question is
How to make the left and righr content areas in the left col areas line up? The left and right are staggered when viewed in Firefox or Mozilla. For some reason the left and right content areas of the left col are clearing each other. Hope that you understand me.
|
|
|
09-29-2004, 07:33 PM
|
#4 (permalink)
|
|
No Longer Here
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
Latest Blog: None
|
Do you have a link?
|
|
|
09-29-2004, 07:45 PM
|
#5 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
No URL. On HD
Code is above. Does this picture help?
|
|
|
09-30-2004, 08:00 PM
|
#6 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
Have I stumped all the experts here!
|
|
|
09-30-2004, 08:33 PM
|
#7 (permalink)
|
|
No Longer Here
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
Latest Blog: None
|
Upload the page, then post a link.
|
|
|
09-30-2004, 08:47 PM
|
#8 (permalink)
|
|
v7n Mentor
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,941
Latest Blog: None
|
1. I agree. It would make more sense to see all the supporting pages and the best way to do this is to view the page online.
2. You are not closing all your DIV tags. It was also difficult to read your code because your example code has "e; and not ".
Example:
==================================
You have
==================================
<div class="center">content here content here contebnt here
<div class="left">content left here
<div class="right">content right here
==================================
It should be
==================================
<div class="center">content here content here contebnt here</DIV>
<div class="left">content left here</DIV>
<div class="right">content right here</DIV>
==================================
imaginemn
|
|
|
09-30-2004, 09:24 PM
|
#9 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
1) I shall upload later and give a link.
2) Looks like my divs are open, but I checked the code and they are paired. They just got dropped somehow when uploaded. Should have put in a tar and attached
Thanks for your time imaginemn and Jazzee. Catch you later.
Try this URL:
http://www.forumsww.com/new/TEMPLATE2.html
Last edited by seonewbee : 09-30-2004 at 09:47 PM.
|
|
|
10-01-2004, 06:09 AM
|
#10 (permalink)
|
|
Moderator
Join Date: 10-13-03
Location: UK
Posts: 2,819
Latest Blog: None
|
Why not post a drawing of what you WANT to happen?
|
|
|
10-01-2004, 12:37 PM
|
#11 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
LazyJim,
See the picture above, Want "content left here" amd "content right here" on the same line but seperate col's. Think of a table with col's vertically aligned.
|
|
|
10-01-2004, 02:01 PM
|
#12 (permalink)
|
|
Moderator
Join Date: 10-13-03
Location: UK
Posts: 2,819
Latest Blog: None
|
ah yeah a pic... i see it now!
should the rows alternate from single col, 2 col, single col, 2 col...ect or just be 2col all the way?
|
|
|
10-01-2004, 02:59 PM
|
#13 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
Quote:
|
Originally Posted by LazyJim
ah yeah a pic... i see it now!
should the rows alternate from single col, 2 col, single col, 2 col...ect or just be 2col all the way?
|
Single col is for titles (h1...h6), banners, and aligning 2col's. Main content is in 2 col's format. If used a bigger page size could be 3 or more col's across. But for now 2 col's.
|
|
|
10-02-2004, 01:51 AM
|
#14 (permalink)
|
|
Moderator
Join Date: 10-13-03
Location: UK
Posts: 2,819
Latest Blog: None
|
can you just set the 2 cols as a <div> each, both with float:left; ?
might need a fixed with <div> around them, and the cell <div>s might need a width like 49% or something.
|
|
|
10-04-2004, 02:30 PM
|
#15 (permalink)
|
|
Inactive
Join Date: 05-12-04
Posts: 520
Latest Blog: None
|
Thanks everybody for all your help. I have given up, and will place a table in the left col of the design. Maybe, I can figure it out later.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:19 PM.
© Copyright 2008 V7 Inc
|