Can I import more than two stylesheets for a background

liunx

Guest
Hi <br />
<br />
I am trying to design a site, which for various reasons has had to be done in frames. Everything works ok, except for one thing.<br />
<br />
My background is split between 2 frames, and needs to be aligned. One of the frames scrolls, and one does not. My problem is that I can get the background to look fine in ie5, but in ie6, and ns6, it does not align.<br />
<br />
Is it possible, therefore, to have 3 stylesheets - one for NS$, 1 for ie6 and ns6, and one for everything else?<br />
<br />
Thanks for any possible answers!!<br />
<br />
Marj:)<!--content-->here's a script i used to use. it's not the most all-encompassing, but it should work.<br />
<br />
<br />
<script language="javascript"><br />
IE5 = (document.all && !document.getElementById) ? true : false;<br />
NS4 = (document.layers) ? true : false;<br />
IE6 = (document.all && document.getElementById) ? true : false;<br />
N6 = (document.getElementById && !document.all) ? true : false;<br />
<br />
if(navigator.userAgent.indexOf('Win') != -1)<br />
{<br />
if (IE5 || IE6)<br />
{<br />
document.write("<link rel=\"stylesheet\" href=http://www.htmlforums.com/archive/index.php/\"win_msie.css\">");<br />
}<br />
else if (N6)<br />
{<br />
document.write("<link rel=\"stylesheet\" href=http://www.htmlforums.com/archive/index.php/\"win_ns6.css\">");<br />
}<br />
else<br />
{<br />
document.write("<link rel=\"stylesheet\" href=http://www.htmlforums.com/archive/index.php/\"win_other.css\">");<br />
}<br />
}<br />
else if(navigator.userAgent.indexOf('Mac') != -1)<br />
{<br />
document.write("<link rel=\"stylesheet\" href=http://www.htmlforums.com/archive/index.php/\"mac.css\">");<br />
}<br />
else<br />
{<br />
document.write("<link rel=\"stylesheet\" href=http://www.htmlforums.com/archive/index.php/\"other.css\">");<br />
}<br />
</script><!--content-->Thanks for your fast response, Trans. Will give it a try and let you know how I get on!<br />
<br />
Maj<!--content-->cool. you'll notice that i'm not even using the NS4 part of it, and once i get to the Mac, i don't even bother checking the browser, so modify away!<br />
<br />
also, i'm lumping IE5 + IE6 together, which you probably don't want, so you may want to separate them.<br />
if (IE5)<br />
{<br />
document.write("<link rel=\"stylesheet\" href=http://www.htmlforums.com/archive/index.php/\"win_msie5.css\">");<br />
}<br />
if (IE6)<br />
{<br />
document.write("<link rel=\"stylesheet\" href=http://www.htmlforums.com/archive/index.php/\"win_msie6.css\">");<br />
}...something like that.<!--content-->Trans,<br />
<br />
I've just found out that this works fine in all of the browsers on my computer, but on the same browsers in another computer, the backgrounds are slightly out. I Download <!--more-->ed ie6 especially, and there is no problem on my computer!<br />
<br />
So, it would seem that it is some sort of difference in monitor size,(Resolution is the same), or something else. It's really got me stumped!!<br />
<br />
Anyway, I have got various people looking at it on different computers/monitors/ browsers etc, so hopefully I might be able to work out what's wrong. The page I am looking at is <!-- m --><a class="postlink" href="http://www.angliacouriers.co.uk/new/ema.html">http://www.angliacouriers.co.uk/new/ema.html</a><!-- m --><br />
if you would care to take a look.<br />
<br />
Thanks for your help so far.<br />
<br />
Maj<!--content-->the background wasn't aligned on my screen (1024x768 17inch ie), threw your page into dreamweaver and saw that the td wasnt aligned with the td of the main section (have a look at the snapshot), don't know if this will change anything but try changing the td width to 77%:<br />
<br />
<TD vAlign=top width="77%" height=47> <br />
<CENTER><BR><BR><IMG height=50 src=http://www.htmlforums.com/archive/index.php/"titleemainfo_files/abusema2.gif" <br />
width=288> </CENTER></TD><!--content-->Thanks Leo,<br />
<br />
Will give it a try and see how it looks - it's so frustrating as it looks ok on my computer, but I know there's something wrong.<br />
<br />
Let you know how I get on!!<br />
Maj<!--content-->Nicely coded. Only one [error (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.angliacouriers.co.uk%2Fnew%2Femainfo.html&charset=%28detect+automatically%29&doctype=HTML+4.01+Transitional&ss=1&outline=1&sp=1">http://validator.w3.org/check?uri=http% ... ine=1&sp=1</a><!-- m -->)] on the main frame, and three [errors (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.angliacouriers.co.uk%2Fnew%2Ftitleemainfo.html&charset=%28detect+automatically%29&doctype=HTML+4.01+Transitional&ss=1&outline=1&sp=1">http://validator.w3.org/check?uri=http% ... ine=1&sp=1</a><!-- m -->)] on the other frame (but the first two can be ignored). <br />
<br />
The frameset page does need to be [tidied up (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.angliacouriers.co.uk%2Fnew%2Fema.html&charset=%28detect+automatically%29&doctype=HTML+4.01+Frameset&ss=1&outline=1&sp=1">http://validator.w3.org/check?uri=http% ... ine=1&sp=1</a><!-- m -->)] a bit though.<br />
<br />
<br />
You'll need to manually validate your CSS at <!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator-uri.html">http://jigsaw.w3.org/css-validator/validator-uri.html</a><!-- m --> as the automatic checker cannot find your style sheets, see this [link (<!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.angliacouriers.co.uk%2Fnew%2Fema.html&warning=1&profile=css2">http://jigsaw.w3.org/css-validator/vali ... ofile=css2</a><!-- m -->)].<!--content-->Thanks for that Giz - I have tried to change the errors, and tidy up the frameset, but I still have the problem where there is a 3 pixel difference between the background in the top frame , and the right frame, and I can't seem to get round it.<br />
<br />
Once this is sorted, I can check all my HTML/CSS etc.<br />
<br />
Maj<!--content-->Hi<br />
<br />
I think I've fixed this problem abit of an alteration to your suggestion, Leo - I made all widths etc exactly the same in both frames, and my sources tell me that the slight kink in the blue bar has gone.<br />
<br />
Thank you all very very much for your help - this problem has been driving me nuts for days!!<br />
<br />
Maj<!--content-->yep it's ligning up beautifully now, well done! :)<!--content-->Maj, it is still misaligned under IE 6 and phoenix on a 15 inch monitor @ 1024 x 768. sorry :P<!--content-->NOOOOOOOO!! What can I do???? Help!!!<br />
<br />
Anyone got any ideas.........<br />
<br />
Maj<!--content-->Are you sure you really need frames and can't go with tables instead?<!--content-->My father has changed the width of the scrollbars in the control panel (windows), he made the scrollbars thicker. That's why it still a few pixels over for me.<br />
But, try this: The blue picture in the top frame seems to be a right-aligned background image. If it wouldn't be there as a background image but as a normal right-aligned <img> instead, you could change the top frame's scrolling to auto and something neat would happen in IE. Try changing your scrollbars thicker, in Windows right-click on the desktop and click "Properties" and then try this out.<!--content-->...you would need to do the same with the blue picture at right in the main frame too.<!--content-->Hi All,<br />
<br />
Finally discovered what it was, thanks to agent - it would seem that some settings on Control Panel/Displays have a slightly wider scrollbar than others, so it will be ok in one person's browser, but not another. <br />
<br />
So, it's back to the drawing board for the background!<br />
<br />
Crobe - I tried tables first off, but cos I wanted scrolling text in only part of the page, this was the best way to go, AND get it to work in NS4, NS6 and IE6 in 800x600 and 1028x768. It still needs some work on NS for the 1028x768, but I think I can get that sorted. Thanks for the idea, tho.<br />
<br />
Thank you all for taking the trouble to help.<br />
<br />
Hope I can do the same for you sometime!<br />
<br />
Maj<!--content-->
 
Back
Top