Link to home
Start Free TrialLog in
Avatar of Wayne Barron
Wayne BarronFlag for United States of America

asked on

CSS, DIV, Fieldset

Hello all;

I am trying to get something to work.
Below is the example code.

The id="CenterText"
Needs to NOT push the lines 1,2,3 down on the side, but to be able to grow
Without effecting anything around it.
I have something out of place, I am just not sure what or which one it is.

Here is the code.
<fieldset style="width:800px;">
<legend><span>this is my place</span></legend>
<div>
<span style="border:1px double #000;">to the left</span>
<span style="float:right; border:1px double #000;">to the right</span>
</div>
            
 <div>name(<span title="name">my name</span>)</div> 

<div>
<!--This needs to be in the middle, and as it grows, the sides do not expand, as they are doing now.
lines 1,2,3 are below, when they should be staying steady underneath the (name) -->
<div align="center" id="CenterText">
information here<br/ >
information here<br/ >
information here<br/ >
information here<br/ >
</div>


<div>1st line</div>				
<div>2nd line</div>
<div>3rd line</div>
</div>

</fieldset>

Open in new window


Thanks All
Carrzkiss
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Perhaps add a height and overflow scroll http://jsbin.com/kesor/1/edit?html,output
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
  <style>
    #CenterText{height:75px;overflow:scroll;}
    
  </style>
</head>
<body>
  <fieldset style="width:800px;">
<legend><span>this is my place</span></legend>
<div>
<span style="border:1px double #000;">to the left</span>
<span style="float:right; border:1px double #000;">to the right</span>
</div>
            
 <div>name(<span title="name">my name</span>)</div> 

<div>
<!--This needs to be in the middle, and as it grows, the sides do not expand, as they are doing now.
lines 1,2,3 are below, when they should be staying steady underneath the (name) -->
<div align="center" id="CenterText">
information here<br/ >
information here<br/ >
information here<br/ >
information here<br/ >
  information here<br/ >
  information here<br/ >
</div>


<div>1st line</div>				
<div>2nd line</div>
<div>3rd line</div>
</div>

</fieldset>
</body>
</html>

Open in new window

Avatar of Wayne Barron

ASKER

Hey Scott.
That will not work.
It is for posting comments, and to have an overflow scroll, would look to messy and unprofessional for this site.

The original code was built with a Table.
However, I am trying to step away from using Tables in this site, if possible.
Some area's will have them, but this area, I am hoping to completely remove tables all together.
I guess I don't understand your question then.  How can you add content without pushing the bottom down unless the bottom is perhaps a sticky footer?

We could put the "information here<br/ >" into div's that are floated left and they will form columns but at some point it will wrap and then push down the <div>1st line</div>.

Can you point to a test url for the way you are doing this now.
Getting there.
The only thing, is that if the text is longer, like what is written on this line right here, that you are reading.
Then it breaks the lines on the side.
So I need to find a way to make it not cross over to the left side, so I tried.
width:75%;
And that did not work.

Here is the updated code, and semi works.

<fieldset style="width:800px;">
<legend><span>this is my place</span></legend>
<div style="background-color:#666; color:#FFF;">
<span style="border:1px double #000;">to the left</span>
<span style="float:right; border:1px double #000;">to the right</span>
</div>
            
 <div>name(<span title="name">my name</span>)
 
 <!--This needs to be in the middle, and as it grows, the sides do not expand, as they are doing now.
lines 1,2,3 are below, when they should be staying steady underneath the (name) -->
 
 <span style="float:right; margin-right:50%;" id="CenterText">
information here<br/ >
information here<br/ >
information here<br/ >
information here<br/ >
information here<br/ >
information here<br/ >
information here<br/ >
information here<br/ >
</span>
 </div> 

<div>

<div><span>1st line</span></div>				
<div>2nd line</div>
<div>3rd line</div>
</div>

</fieldset>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Scott.
The reason why I used what I did, is it is already setup on the site, for the user-eye-candy that I am using, and need to continue using it as well.
The layout you showed, works great, just not for what i am doing right now.

As for the Bootstrap, that looks really good, however, not what what I am working on at this moment.
However, maybe in the future, as I have a lot of projects in the works for 2014, that it might just come in handy for.

I am going to close this one out.
Accept my last code as Answer, and give you the points for your last post.
As it is very informative.

Have a good one Scott.
Wayne
I figured out my issue on my own, as listed in the accepted answer.
To Scott, thanks as always, for the great advice.
It will come in very handy sometime in a future 2014 project.

Wayne