www.webdeveloper.com
Results 1 to 6 of 6

Thread: Simple thin black border for frame in IE

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Location
    St Andrews, Scotland
    Posts
    5

    Simple thin black border for frame in IE

    Hello there.
    I've been working on this site:
    http://www.st-andrews.ac.uk/~othello

    I have two frames: a slim navigation frame on the left, and a main content frame on the right. Both are a slightly different shade of green, and I want a nice crisp thin black line separating them.

    I've managed to get exactly this effect in Safari, Firefox and Chrome. IE however renders the frameborder entirely differently. I am prepared to employ some conditional CSS depending on browser, but for now I can't for the life of me work out how to get IE to give me a thin black line separating the two frames. Is it possible?

    Many thanks.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    <frameset onload="refreshFrame();" rows="*" cols="140,*" framespacing="1" frameborder="1" border="1"  bordercolor="#000000">
      <frame name="navigation" src="leftnav.htm" scrolling="no" frameborder="">
      <frame name="content" src="home.htm" frameborder="">
    </frameset>

  3. #3
    Join Date
    Oct 2010
    Location
    St Andrews, Scotland
    Posts
    5
    Thanks for that Fang.
    It doesn't seem to do the trick on the version of IE I'm testing on here, but that could be a problem with trying things out on IE for Mac. I got it to work myself in the end with this unhappy use of inline styles though:

    Code:
    <frameset onload="refreshFrame();" rows="*" cols="140,*" frameborder="0" border="0" framespacing="0">
      <frame name="navigation" src="leftnav.htm" scrolling="no" style="border-right: 1px black solid">
      <frame name="content" src="home.htm" style="border-left-style:none">
    </frameset>
    At that point my problem got way more complicated, as I then had to get browser detection and URL replacement (swapping index.htm, my main frameset file, for indexie.htm containing the new IE-friendly settings) to work with existing scripts in the header. I'm calling it a day for today and hope to check it all when I get to a PC.

    Your help much appreciated though.

  4. #4
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,272
    And with an little image in the background like this in soc_styles.css:
    HTML Code:
    body {background: url(pixelblack.gif) repeat-y #2f6635;font-family:Futura, Century Gothic, san-serif}
    The image must be one pixel wide but may be several hundred in height. See to http://www.yourhtmlsource.com/stylesheets/cssbackgrounds.html.
    Good luck, your site look fine !

  5. #5
    Join Date
    Oct 2010
    Posts
    9
    Just 1 tip if i may, frames won't get indexed by google. Frames are old in developing websites. Please use div's instead.

    Just my thoughts.

  6. #6
    Join Date
    Oct 2010
    Location
    St Andrews, Scotland
    Posts
    5
    Thanks for the tip Orange. I understand that everyone is using divs for commerical purposes now. If the main argument against frames is that they don't get indexed by Google however, the main argument for dropping frames doesn't speak to me. I'm fine if one or two orphaned frames appear on Google to be found surreptitiously by people looking for other things. I'm not trying to attract lots of traffic to the main site. It's for a local club.

    Having said that, even locals who know about the site may google something like "St Andrews Othello" to get back to it and this links to home.htm, the default page in the main content frame. I currently have a script to put this page in its proper framed home when clicked through.

    Arguments in favour of frames for me though:
    - navigation is always in the same place, doesn't scroll away when a user reads down the content page (I find javascript effects that emulate a fixed navigation bar by constantly readjusting its relative position to be inelegant and flickery)
    - keeping the navbar in a separate frame makes updating it for the whole site very simple. Trickier if you've got some div code that needs to be copied to every page. I could keep it in a separate php file that gets called in to every page, but then that means doing the whole site in php, not as simple as just using frames.

    Anyway, I was just looking for some help with my site as it's been set up. It seems to be a trend in other fora that somebody posts, looking for a fix with technology X. Technology X is currently unpopular for whatever reasons (oftentimes people have forgotten why they're not supposed to like technology X any more). Even if the fix is simple, the majority of replies are along the lines of: dude, why are you using technology X? That's, like, so old school! Just my observation.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles