/    Sign up×
Community /Pin to ProfileBookmark

calling javascript

How do you call stylesheets like javascript.js files?
<script language=”JavaScript1.2″ src=”java/javascript1.js”>
</script>

Can this be done and would this be considered a stylesheet?

<style>
<!–
.itemBorder { border: 1px solid black }
.itemText { text-decoration: none; color: #FFFFFF; font: 14px Arial, Helvetica }
.itemText2 { text-decoration: none; color: #000066; font: 16px Arial, Helvetica }
.crazyBorder { border: 2px outset #663399 }
.crazyText { text-decoration: none; color: #FFCC99; font: Bold 12px Arial, Helvetica }
–>
</style><style>
.hovered {
text-align: center;
background-color:#0000A0;
border-style:solid;
border-width:1px;
border-color:#FFFFFF #808080 #808080 #FFFFFF;
width: 80px;
height:15px;
color: #FFFFFF;
font-family: arial, sans serif;
font-size: 13px;
cursor: default;
}
.normal{
text-align: center;
background-color:#C0C0C0;
border-style:solid;
border-width:1px;
width: 80px;
height:15px;
border-color:#C0C0C0;
color: #000000;
font-family: arial, sans serif;
font-size: 13px;
cursor: default;
}
</style>

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@MstrBobFeb 05.2005 — [font=trebuchet ms][COLOR=royalblue]This is not a Javascript question, but more of an HTML/CSS question. Nevertheless, External CSS files are quite popular and the best thing to do as they will cut down on bandwith. Save your CSS (Minus the style tags of course, just CSS) into a file and give it a .css extension. Now, in your webpage, put this in your head section:



<i>
</i>&lt;meta name="Content-Style-Type" content="text/css"&gt;
&lt;link rel="stylesheet" type="text/css" href="file.css" /&gt;


Replacing file.css with the name of your CSS file.[/COLOR][/font]
Copy linkTweet thisAlerts:
@ranosbauthorFeb 05.2005 — Thanks!

What would a media="all tag mean?
Copy linkTweet thisAlerts:
@MstrBobFeb 05.2005 — [font=trebuchet ms][COLOR=royalblue]Check the W3C Specifications:



[URL=http://www.w3.org/TR/html401/present/styles.html#adef-media]Media Attribute[/URL]. and more specifically [URL=http://www.w3.org/TR/html401/types.html#type-media-descriptors]Media Selectors[/URL]. In a nutshell, the media rules for CSS 2.1 and the attribute for HTML indicate what type of device should read the style information. Thus, you can have different CSS and so, a different design/layout for a graphical browser, like IE or Firefox, different CSS for a printer, or for a projector, or for an audio browser, or a TV or something. 'all' means, well, all devices should use it, which is what it defualts to.[/COLOR]
[/font]
×

Success!

Help @ranosb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...