473,574 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem styling a scrollbar inside a frame

25 New Member
Hi, before you say it i know frames are bad practice - but i'm developing dynamic content on a site which has already been designed, so alas there's no option but to use them. Anyway, I just want to add simple styling to the scrollbar of the left hand frame of the page, but the styling i've applied isn't working for some reason.

The site is at http://www.maguiresonline.co.uk/new_website/index.html
It's the scrollbar in the middle of the page which i want to style.

I've added the scrollbar styles to both the <head> of the frameset page, and also the frame source page, code provided below.

Any help would be appreciated - cheers

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  5. <title>Maguire Advertising Latest news</title>
  6. <link rel="stylesheet" type="text/css" href="main.css" />
  7. <style type="text/css">
  8. body {
  9. overflow:auto;
  10. scrollbar-face-color:white;
  11. scrollbar-highlight-color:#ff9600;
  12. scrollbar-3dlight-color:#ff9600;
  13. scrollbar-darkshadow-color:#ff9600;
  14. scrollbar-shadow-color:white;
  15. scrollbar-arrow-color: white;
  16. scrollbar-track-color:#ff9600;
  17. }
  18. </style> 
  19. </head>
  20. <body>
  21. <table width="460" border="0" cellpadding="0" cellspacing="0">
  22.   <!--DWLayoutTable-->
  23.   <tr>
  24.     <td width="9" height="20">&nbsp;</td>
  25.     <td width="118" valign="top"><img src="general_images/homepage_images/news_header.jpg" alt="Maguire Advertising latest news header" width="117" height="21" /></td>
  26.     <td width="282">&nbsp;</td>
  27.   </tr>
  28.   <tr>
  29.     <td height="5"></td>
  30.     <td></td>
  31.     <td></td>
  32.   </tr>
  33.   <tr>
  34.     <td height="2"></td>
  35.     <td colspan="2" valign="top"><img src="general_images/homepage_images/line_break.gif" alt="Maguire Advertising Line break" width="490" height="2" /></td>
  36.   </tr>
  37.   <tr>
  38.     <td height="19"></td>
  39.     <td id="news_frame">
  40.    <?
  41.    //get the news stories and print in this frame
  42.    $sql = mysql_query("select * from news order by date desc");
  43.    $numrows = mysql_num_rows($sql);
  45.    for ($i=0; $i<$numrows && $i<3; $i++)
  46.    {
  47.            $row = mysql_fetch_array($sql);
  48.         $date = $row['date'];
  49.         $year = substr($date, 0, 4);
  50.         $month = substr($date, 4, 2);
  51.         $day = substr($date, 6, 2);
  52.         echo "<h4 class = 'header'><span class='date_header'>".$day."/".$month."/".$year."</span><br/>";
  53.         echo $row['title']."</h4>";
  54.         echo "<p class = 'story'>".$row['story']."</p>";
  55.         //get any images and wrap text around them
  56.         $sql2 = mysql_query("select * from Image where news_id = '".$row['id']."'");
  57.         $numrows2 = mysql_num_rows($sql2);
  59.         if ($numrows2>0)
  60.         {
  61.             $row2 = mysql_fetch_array($sql2);
  62.             echo "<p><img src = 'news_images/".$row2['url']."' alt = '".$row2['alt']."' title = '".$row2['alt']."' class = 'news_images'></p>";
  63.         }
  64.    }
  66.    ?>
  67.    </td>
  68.   </tr>
  69. </table>
  70. </body>
  71. </html>
Oct 9 '07 #1
3 3193
7,435 Recognized Expert Expert
Styling scrollbars is considered bad practice, too.

Don't know if this affects that but you are missing a closing </frameset> tag.
Oct 9 '07 #2
7,435 Recognized Expert Expert
Also, you are using an 'id' name more than once. id's are to only be used once per page and must be unique to one element.
Oct 9 '07 #3
23 New Member
I believe those scrollbars are controlled by the child and not the parent (with the exception of not allowing them via the scrolling="no" command in the parent.

In the child you would put the styling in the body tag, and you could use something like this:

Expand|Select|Wrap|Line Numbers
  1. scrollbar-base-color: #000000; scrollbar-arrow-color: #FFFFFF; scrollbar-3dlight-color: #333333; scrollbar-darkshadow-color: #333333; scrollbar-face-color: #000000; scrollbar-highlight-color: #666666; scrollbar-shadow-color: #666666; scrollbar-track-color: #333333;
Hope that helps... by the way, the use of frames is NOT bad practice in and of itself... it's just that there are a lot of people who use them inappropriately , but those people's sites would suck wether they used frames or not.
Oct 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Thomas Buschhardt | last post by:
Hallo, I have a problem with Tkinter and the module socket. In a console-window everything works fine, but in a Tkinter-window I can no more use the widgets. I found some other mails with this problem, but no solution (I understand really :-) Here is my code: ----------------------------------------------- import win32ui, dde, string,...
by: Z | last post by:
Hi, I have problem with auto-scrolling frames in IE (6.0 on Xp, but same happens with IE 5.5 on Win2k): If I set scrolling="auto" to frame, IE reserves space where vertical scrollbar normally goes and doesn't render contents there when scrollbar is hidden. Here is frameset with left and right frames:
by: Christopher Benson-Manica | last post by:
I have a table in a frame with a scrollbar. I want the table to be 100% of the width of the frame excluding the width of the scrollbar. Opera and Netscape leave space for the scrollbar, but IE6 does not when in conforming mode (with a transitional DTD). Is there a way (besides using browser-specific stylesheets) to get all three browsers to...
by: anx | last post by:
I've got a grid-managed frame, containing a column of Labels, and a corresponding column of Entry widgets. I'd like to be able to display dozens, or even hundreds of rows, and use a vertical scrollbar to scroll through them in the frame. So far i can get a scrollbar to display, but it won't scroll anything. So that's definately wrong. And the...
by: Dustan | last post by:
I'm trying to get a scrollbar bound with a Frame, and I keep on getting a scrollbar, but it doesn't actually scroll. Some help, please?
by: C D Wood | last post by:
To whom this may concern, Below is the source code, which demonstrates a problem I am having making a GUI for my python project work. 'table.txt' is a file that is read from the same folder. My code writes to a text file 'table.txt', and 'table.txt' is displayed in
by: Ray | last post by:
Hi, would someone tell me how to make scrollbar work under grid? I think I'm missing something to connect scrollbar with the grid. following is some sample code. it shows the scrollbar, but it do not work. Thanks a lot for the help! Ray
by: dav3 | last post by:
Sorry for yet another thread on this project :( Here is my problem, i have done my entire project on my pc, however when i present the project I will be doing so on my laptop (which has a smaller resolution) and as such my JFrame does not fully appear on the screen. I cannot make it smaller, so i need to add a scrollbar (i think) but I am not...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.