SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question iFrame scrollbar colours ....

    Another CSS/iFrames question! I want to assign colours to the iFrame's scrollbar. Apparently, you can't actually assign a class or style directly to an iFrame cos it just won't work -- not even in Mozi. However, my looks around Google imply that if you set scrollbar colours in the body style then the iFrame will pick them up. That's all well and good, but I have four different colour schemes that change from page to page and I don't want to have four separate stylesheets. I guess sub-classes of the body style is the answer, but I'm not sure how to do this. Anyone tackled this before? Any pointers?

    Thanks in advance,

    G

    Edit:

    Done some more poking about and fiddling with my code. Discovered the the scrollbars CSS has to be in the stylesheet for the iFrame's content page rather than the body of the parent document. Still leaves me with the same dilemma of trying to avoid having 4 separate style sheets though, so same question applies!
    Last edited by greg.harvey; Jan 31, 2003 at 06:05.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right! Never mind .... sussed it. Here's the CSS (to go in the stylesheet for your iFrame content page):

    Code:
    body.yellowbars {
    	font-family: Arial, Helvetica, sans-serif;
    	background-color: #FFFFFF;
    	scrollbar-face-color: #FFCC00;
    	scrollbar-shadow-color: #FF9900;
    	scrollbar-highlight-color: #FFCC99;
    	scrollbar-3dlight-color: #FFCC99;
    	scrollbar-darkshadow-color: #FF9900;
    	scrollbar-track-color: #E9E9E9;
    	scrollbar-arrow-color: #FFFFFF;
    }
    
    body.greenbars {
    	font-family: Arial, Helvetica, sans-serif;
    	background-color: #FFFFFF;
    	scrollbar-face-color: #FFCC00;
    	scrollbar-shadow-color: #FF9900;
    	scrollbar-highlight-color: #FFCC99;
    	scrollbar-3dlight-color: #FFCC99;
    	scrollbar-darkshadow-color: #FF9900;
    	scrollbar-track-color: #E9E9E9;
    	scrollbar-arrow-color: #FFFFFF;
    }
    
    etc.
    HTML in the iFrame content:

    Code:
    <body class="yellowbars">
    Simple enough for you CSS gurus but I don't really have much call to mess around with sub-classes so I forget everything between outings!

    G


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •