Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help with cells in csc

Status
Not open for further replies.

timgerr

IS-IT--Management
Jan 22, 2004
364
US
I want to use a tubeless display returning information from a database;
Code:
-------------------------------------------------------------
|                    |                          |           |
|                    |                          |           |
-------------------------------------------------------------

I need to have 3 cells and I want to use css, can this be done?

Thanks

-T

-How important does a person have to be before they are considered assassinated instead of just murdered?
-Need more cow bell!!!

 
If data is tabular, like information from a DB then tables should be used If its for layout purposes. then CSS is the way to go.

However and to address your question. Creating 3 divs and floating them should accomplish what you want.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
SO I have been playing with this,
Code:
<html>
  <head>
	<style type="text/css" media="screen">

		
		.floatleft
		{
			float: left;
			width: 400px;
			height: 100px;
			background-color: #F63;
			border: 1px solid #F30;
		}
</style>
  </head>
  
<body>
<h1>Three elements with "float: left" applied</h1>

<div class="floatleft">1</div>
<div class="floatleft">2</div>

</body>

The problem is that the float left will put the poxes right next to each other, how can I stack them on top of each other?

Thanks
-T

-How important does a person have to be before they are considered assassinated instead of just murdered?
-Need more cow bell!!!

 
You said you wanted 3 cells next to each other. If you want them stacked. remove the float. Or Am I missing something?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
OK, I am sorry for the confusion. Now I do need three cells. I was thinkin if I saw the code for two cells then I could create three cells. I need to have 3 cells then depending on the output I will need another three cells stacked on top of the prevous cells
Code:
-------------------------------------------------------------
|                    |                          |           |
|                    |                          |           |
-------------------------------------------------------------     
-------------------------------------------------------------
|                    |                          |           |
|                    |                          |           |
-------------------------------------------------------------

Somthing like that.

-How important does a person have to be before they are considered assassinated instead of just murdered?
-Need more cow bell!!!

 
Well By floating the Cells, they will automatically drop down to the next row, when they can't fit in the current one. That's the beauty of floating.

So for example:

Code:
.celldiv{
float:left;
width:100px;
height:100px;
margin:0px;
padding:0px;
border:1px solid #000000;
}

.cellwrapper{
width:310px;
margin:0px;
padding:0px;
}



<div class="cellwrapper">
<div class="celldiv">Cell 1</div>
<div class="celldiv">Cell 2</div>
<div class="celldiv">Cell 3</div>
<div class="celldiv">Cell 4</div>
<div class="celldiv">Cell 5</div>
<div class="celldiv">Cell 6</div>
</div>

Cells one through 3 will be on the first row, cells 4 though 6 will be on the second row. And so on and so forth.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top