1
3afooor
can i use more than one style sheets
  • 2004/11/24 8:54

  • 3afooor

  • Just popping in

  • Posts: 28

  • Since: 2004/9/20


hi all in my style sheet the font in medium for the hole site


the members who are using 800 by 600 resolution said that the font is very big also the blocks are not probarly ordered

if i make the font small the users who use 1024 resolution said that the font is very small to read

i have a java code that give me the resolution of the user so how can i use it if the res. is 800 use small

else use medium ???????????????????

this is the style
-------------------

body { background: white; margin: 0; padding: 0;}

table {
width: 100%;
margin: 5;
padding: 5;
font-size: 16px;
}
------------------

thanks

2
Bassman
Re: can i use more than one style sheets
  • 2004/11/24 9:55

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


You have 2 style sheets. 1 is style.css, the other style1024.css (or whatever you want to call them) each with different font declaration. Then the js calls whichever style sheet is specified by the user's resolution.

I've done the same thing before for different screen resolutions, except the difference was a table background image for the logo.

3
3afooor
Re: can i use more than one style sheets
  • 2004/11/24 12:26

  • 3afooor

  • Just popping in

  • Posts: 28

  • Since: 2004/9/20


yes this is what i want but i dont know how to make it

could you plz help where should i edit and how ????

thanks

4
Bassman
Re: can i use more than one style sheets
  • 2004/11/24 21:09

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


OK, look in theme.html: I put the following javascript in the <head> section, after this line:
Quote:

<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />


I put:
Quote:

<script type="text/javascript">
<!--
if ((screen.width>=1024))
{
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>style1024.css' />");
}
else
{
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>style.css' />");
}
//-->
</script>


then in style.css look for
Quote:

body td, p, div {font-family: verdana, arial, helvetica; font-size: 11px;color: #7C8DC5; }

Or similar. You change font-size to whatever you want for 800 resolution.
Then copy style.css, change the name to style1024.css and change font-size to a larger value than you have in style.css.

You may have to go through the style1024.css and change the font size in other places too. This depends on the theme you're using.

5
bwirum
Re: can i use more than one style sheets
  • 2005/3/8 12:11

  • bwirum

  • Just popping in

  • Posts: 49

  • Since: 2004/1/16


Question:

How would I go about doing this if I'm using more than one css. I'd only have to change one of them tho, my css import looks like this:

<style type="text/css">
<!--
@
import url("<{$xoops_imageurl}>style.css");
@
import url("<{$xoops_imageurl}>blocks.css");
@
import url("<{$xoops_imageurl}>modules.css");
-->
</
style>


Only need to substitute the style.css with a style1024 or something.

6
Bassman
Re: can i use more than one style sheets
  • 2005/3/8 12:39

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Just like above.
Why do you have 3 style sheets? why not just make 1?

7
bwirum
Re: can i use more than one style sheets
  • 2005/3/8 14:58

  • bwirum

  • Just popping in

  • Posts: 49

  • Since: 2004/1/16


Well, it sorta came with the theme, StudioC, that I've based the site on, and I like the less complexity thing within each of it.

I tried doing it like you suggested above, but I had no luck with it. Care to make me an example out of that? Would be much appreciated.

8
Bassman
Re: can i use more than one style sheets
  • 2005/3/8 22:47

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Just use the example above and change what you want in style.css and call it style1024.css. The other 2 style sheets probably don't matter for what you're wanting to change. If that doesn't work, try asking Michael (StudioC) as it's his theme.

Just as a thought, you could try:
Quote:

<script type="text/javascript">
<!--
if ((screen.width>=1024))
{
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>style1024.css' />");
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>blocks.css' />");
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>modules.css' />");
}
else
{
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>style.css' />");
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>blocks.css' />");
document.write("<link rel='stylesheet' type='text/css' href='<{$xoops_imageurl}>modules.css' />");
}
//-->
</script>


Let me know how you go.

9
bwirum
Re: can i use more than one style sheets
  • 2005/3/9 7:18

  • bwirum

  • Just popping in

  • Posts: 49

  • Since: 2004/1/16


That worked very well, thanks a lot.

I thought you had to use the @import url function to retrieve multiple css files, but I guess that isn't so.

Thank you very much indeed!

Login

Who's Online

204 user(s) are online (138 user(s) are browsing Support Forums)


Members: 0


Guests: 204


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits