Jump to content

[SOLVED] Exclude from CSS


ldsmike88

Recommended Posts

I have a javascript menubar at the top of my page that defines the colors and everything for the font of the menubar, but when I look at it online the font colors and sizes are different because my css file overwrites the javascript when it displays it. Is there anyway to exclude that area of the page from the css file? Maybe php could help somehow...

Thanks!

 

Michael

Link to comment
Share on other sites

But I'm not really commenting in css.

For example:

 

<html>
<head>
<link href="../index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript" src="../javascript/admin.js"></script>
//Everything else.
</body>
</html>

 

How do I apply the css to the "Everything else" but not to the javascript? Sorry for suck a stupid question but I don't know what to do.

Link to comment
Share on other sites

The javascript writes text in html so it gets the css applied to it.

 

But apparently it writes out bare HTML, as opposed to HTML with classes or ids.

 

You need to make it output the HTML with classes or ids in order to style them individually. Also, they will inherit from the parent style unless you override it with a new style in the CSS declaration.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.