User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 373,484 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,956 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 3957 | Replies: 6 | Solved
Reply
Join Date: Mar 2007
Location: RI
Posts: 146
Reputation: Dsiembab is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Dsiembab's Avatar
Dsiembab Dsiembab is offline Offline
Junior Poster

Help css div's and tables table cells and scrolling

  #1  
Apr 17th, 2007
I have a webpage and in my html the container holds the sidebars and the content2 I have put a 3columnX8row table instead of a million <div>s I was wondering how I could make the data cells scroll vertically in my css intead of a million <div>s. well actually 12 <div>s.
this may look crazy, but I'm just learning
#container {
font-family: Arial, Helvetica, Verdana, Sans-serif;
float: right;
width: 640px;
margin: 0 auto;
}
#sidebar-a {
float: right;
width: 120px;
line-height: 18px;
border-left: 1px solid #efefef;
}
#sidebar-a .padding, #sidebar-b .padding, #sidebar-c .padding {
padding: 0;
}
#sidebar-b, #sidebar-c {
clear: right;
float: right;
width: 120px;
line-height: 18px;
border-left: 1px solid #efefef;
}
#content2 {
float: left;
width: 507px;
border-left: 1px solid #efefef;
border-right: 1px solid #efefef;
border-bottom: 1px solid #efefef;
}
#content2 caption {
font-size: 24px;
font-weight: bold;
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #efefef;
}
table {
height: auto;
border: collapse;
width: auto;
}
td {
width: 33%;
text-align: center;
border: collapse;
border-left: 1px solid #efefef;
border-right: 1px solid #efefef;
border-bottom: 1px solid #efefef;
}
Might look a little nutty Don't need the answer written out just would like to pointed in the right direction, Thanks
Last edited by Dsiembab : Apr 17th, 2007 at 1:54 am. Reason: was confusing and maybe still is
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2005
Posts: 354
Reputation: DanceInstructor is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 12
DanceInstructor's Avatar
DanceInstructor DanceInstructor is offline Offline
Posting Whiz

Re: css div's and tables table cells and scrolling

  #2  
Apr 17th, 2007
Give the table cell you want to scroll an id, then give it a fixed height, and set overlfow to scroll. Should look something like this:

td#id {
height: 400px;
overflow: scroll;
}

I would also like to coment, that when using div's for layout I rarely use more than 5 or 6. I'm not sure why you think you have to have as many as you believe you do.
Clear Mind Hosting and Web Design

If I've helped you please consider adding to my reputation.
Reply With Quote  
Join Date: Mar 2007
Location: RI
Posts: 146
Reputation: Dsiembab is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Dsiembab's Avatar
Dsiembab Dsiembab is offline Offline
Junior Poster

Re: css div's and tables table cells and scrolling

  #3  
Apr 17th, 2007
Thanks for the reply, appreciate it, I was wondering though if I could set this class to all my td's using the min-height and the max-hieght and the overflow auto? right now my page has 8 <div>s I thought i had to use so many div's for the layout. Thanks again, dave
Reply With Quote  
Join Date: Mar 2007
Location: RI
Posts: 146
Reputation: Dsiembab is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Dsiembab's Avatar
Dsiembab Dsiembab is offline Offline
Junior Poster

Solution Re: css div's and tables table cells and scrolling

  #4  
May 8th, 2007
I bought o'rielly's css definitive guide so I don't have to ask uninformed questions.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,410
Reputation: MidiMagic is on a distinguished road 
Rep Power: 6
Solved Threads: 99
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Posting Maven

Re: css div's and tables table cells and scrolling

  #5  
May 8th, 2007
Originally Posted by Dsiembab View Post
Thanks for the reply, appreciate it, I was wondering though if I could set this class to all my td's using the min-height and the max-hieght and the overflow auto? right now my page has 8 <div>s I thought i had to use so many div's for the layout. Thanks again, dave


You certainly can.

Instead of:
in the above style use:

Then use this for the opening td or div tags, like this:
<td class="scrol">
Last edited by MidiMagic : May 8th, 2007 at 2:37 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Mar 2007
Location: RI
Posts: 146
Reputation: Dsiembab is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Dsiembab's Avatar
Dsiembab Dsiembab is offline Offline
Junior Poster

Solution Re: css div's and tables table cells and scrolling

  #6  
May 8th, 2007
Originally Posted by MidiMagic View Post
You certainly can.

Instead of:
in the above style use:

Then use this for the opening td or div tags, like this:
<td class="scrol">

Thanks midi So I would put in my style sheet:
.scroll {
max-height: 300px;
min-height: 200px;
overflow: auto;
}
Thanks man appreciate it
Reply With Quote  
Join Date: Jan 2007
Posts: 2,410
Reputation: MidiMagic is on a distinguished road 
Rep Power: 6
Solved Threads: 99
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Posting Maven

Re: css div's and tables table cells and scrolling

  #7  
May 10th, 2007
That is correct.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 5:45 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC