?
Solved

Scrolling DIV

Posted on 2006-11-02
8
Medium Priority
?
187 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
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 750 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

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