Solved

Scrolling DIV

Posted on 2006-11-02
8
183 Views
Last Modified: 2010-04-09
Please take a look at this page
http://ca.geocities.com/malik_arefin@rogers.com/test/index_new.html

I am trying to separate the Month section (Jan, Feb, March) so it is the only
part that scrolls sideways not the whole page. Could someone please help
me figure this out.

Thanks
0
Comment
Question by:apparition
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 5

Author Comment

by:apparition
ID: 17858393
P.S. I dont want to use frames since all the data needs to be in the same form.
0
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17858458
The first thing that comes to mind is the following:


<div id="main" style="width: 800px;">
Here's the main body of the page


<div style="overflow: visible;">
Here's the stuff you want to scroll
</div>


</div>


It's clean, understandable, a perfect application of valid CSS applied to valid markup, and completely tanks in MSIE.  ::shrug:: We can't have everything.


(There may be a way of tricking MSIE into doing this; I don't know off the top of my head, but this may be a starting point.)
0
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17858488
Sorry, it would be nice if I thought a little before posting.  "overflow: scroll;" makes a whole lot more sense than "visible"
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:apparition
ID: 17858496
I need it to work in IE......plus It be helpful if someone could show me how modify my existing code to achieve this....

0
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17858714
Here's what I'd recommend; I've tested this on Firefox 1.5 and MSIE 6.0.  I took out all the tables you were using for layout, which make it excessively painful to style, and replaced them with valid CSS.

<style type="text/css">
#header
, #managers {
      width: 900px;
}

#header {
background-color: white;
background-image: url(index_new_files/title.gif);
height: 45px;
background-repeat: no-repeat;
}

#managers {
background: #a5bec6;
text-align: right;
}

ul#views {
      float: right;
      clear: both;
      padding: 0;
      
}
ul#views li {
      list-style: none;
      float: left;
      border: 1px solid black;
      padding: 0;
      margin: 0;
      background: white;
}
ul#views li.active {
      background: gray;
}

</style>

</head>

<body>
<div id="managers">
      <select id="Select7" class="input1" disabled="disabled">
      <option selected="selected">Joe Smith</option>
      </select>
</div>

<div id="header"></div>


<ul id="views">
      <li><a class="link2" href="http://ca.geocities.com/malik_arefin@rogers.com/test/month.html">Monthly</a></li>
      <li class="active"><a class="link2" href="http://ca.geocities.com/malik_arefin@rogers.com/test/qtr.html">Qtrly</a></li>
</ul>

<br style="clear: both;" />


<table style="overflow: scroll;">

<!-- big scary table of data here -->

</table>
0
 
LVL 5

Author Comment

by:apparition
ID: 17859074
Thanks,

but I am not sure if this is going to accomplish what I want to do.

I want to split the main table so only the months section is scrollable but the other items to the left stay static.
0
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 250 total points
ID: 17859115
Ahhh; ok.  In that case I might suggest breaking it into two tables:

<table style="float: left;">
<!-- stuff you don't want to scroll.
</table>

<table style="float: left; overflow: scroll;">
<!-- stuff you do want to scroll -->
</table>

<br style="clear: both;" />
0
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17950193
If the B grade indicates you were hoping for more information I hope you'll ask!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question