Solved

Scrolling DIV

Posted on 2006-11-02
8
185 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
Independent Software Vendors: 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

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!

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.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

718 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