473,396 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem styling a scrollbar inside a frame

25
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);
  44.  
  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);
  58.  
  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.    }
  65.  
  66.    ?>
  67.    </td>
  68.   </tr>
  69. </table>
  70. </body>
  71. </html>
  72.  
Oct 9 '07 #1
3 3170
drhowarddrfine
7,435 Expert 4TB
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
drhowarddrfine
7,435 Expert 4TB
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
Z1P2
23
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;
  2.  
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

1
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...
5
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...
8
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...
2
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...
8
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?
1
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....
2
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
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...
0
agi2029
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,...

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.