Forum Moderators: not2easy

Message Too Old, No Replies

resize element

         

zao420

1:21 am on Feb 12, 2004 (gmt 0)

10+ Year Member



hi i am trying to make a tableless forum. and came accross this site well searching for some info.. anyway i s there a way to resize a element to the size of the one next to it.. i am probally not explaining this good. here is the forum i am talking about

<Sorry, no links. See TOS [webmasterworld.com]>

here what i am trying to do..


<style type="text/css">
<!--
.Table {
background-color: white;
height: auto;
}

.FTContent {
background-color: #1F3D52;
height: 100%;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
float: left;
font-size: 11px;
}
-->
</style>
<Div class="Table">
<div class="FTContent alignL" style="width:7%; height:100%">
<p class="iffc nw"><b><span class="ifl">User</span></b><br />
<span class="ffs">Forum Admin</span><br />
</p>
<p class="iffc ffs nw">Canada<br />
Posts<br />
want this to resize to next to same size as the one beside it</p>
</div>
<div class="FTContent alignL" style="width:90%"> <span class="iffc ffs"> post date and topic stuff </span>
<hr noshade="noshade" size="1" />
<p><span class="iffc">main content </span></p>
<hr noshade="noshade" size="1" />
<span class="ifl"> </span>
<p><span class="iffc ifl"> sig </span>
</div>
</Div>

[edited by: tedster at 6:54 am (utc) on Feb. 12, 2004]

D_Blackwell

6:20 am on Feb 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[edit] Flaw in test. Need to check the solution again. [/edit]

FYI - Best to take down the link before the mods do.

D_Blackwell

7:09 am on Feb 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tried to help and now need rescuing myself. Originally, IE did what I wanted, but Mozilla insists that I do it correctly. lol I ran into trouble getting the main "box" to render, and finally cheated to force it. Also had difficulty getting the "rightcol" to take up the rest of the width, followed by then having to tweak the width to render across browsers and resolutions. Both "fixes" leave me looking for the fatal flaw in the original plan, and for a better plan.

<html>
<head>
<style type="text/css">
<!--
html, body {
margin: 0; padding: 0; font-size: 100%;
}
#box {
width: 100%; font: 500 1em Arial, Verdana, sans-serif; background-color: #1f3d52;
}
#leftcol {
float: left; width: 7%; font-size: .7em; background-color: #1f3d52; padding: .3em; height: 100%;
}
#rightcol {
float: right; border-left: .1em solid #000; border-bottom: .1em solid #000; background-color: #1f3d52;
padding: .5em; height: 100%; width: 89%;/*****Don't like the way I used width to make the whole thing
work.*/
}
.text {
border-bottom: .1em solid #faebd7; width: 100%;
}
-->
</style>
</head>
<body>
<div id="box">
<div id="leftcol">
<p>
Forum Admin
<br />
Canada
<br />
Post
</p>
</div>
<div id="rightcol">
<div class="text">
post date and topic stuff
</div>
<div class="text">
main content
<br />
main content
<br />
main content
<br />
</div>
<div>
sig
</div>
</div>
<!--#####Ugly fix to give "box" enough height-->
<p style="clear: both; margin: 0;">.
</p>
</div>
</body>
</html>
[edit] Actually meant fatal flaw in MY approach to the solution. [/edit]

[edited by: D_Blackwell at 8:20 am (utc) on Feb. 12, 2004]

zao420

8:14 am on Feb 12, 2004 (gmt 0)

10+ Year Member



sorry about the link

thanks for the reply. kinda late now so i will chekc it out tomorrow. anyway as you said there is a fatal flaw in this way would do you think would be a better way.. i am just learning to do do this and don't want to learn a crapy way..

grahamstewart

8:53 am on Feb 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i am trying to make a tableless forum

Why?

A forum is a table of messages, usually with columns for title,author,date etc - so why not use the <table> tag? It is the 'correct' thing to do.

You can still use CSS to supply your styles and layout other elements that are required outside of the table.

Tables are not 'bad'. There is nothing wrong with using the table tag when you want to markup a table. Just don't use it to control layout.

zao420

12:53 am on Feb 13, 2004 (gmt 0)

10+ Year Member



why because i think i can make one.. yea tables are good for this but just because something is doesn't mean something else is crapy.

anyway i almost have it figuard out. besides trying to make it display right in mozilla firefox and IE. if anyone want to know how i change let me know.. that is if anyone is interested in it..