HTML CSS control

Posted on 2014-07-13
Last Modified: 2014-07-14
How can I control the style.css so when I use include newhtml uses another style1.css not style.css

My site has already been his style, when I use include some html I want to have a second stylw only that page
Question by:imediagroup
    LVL 52

    Expert Comment

    by:Scott Fell, EE MVE
    What does this mean?

    when I use include newhtml

    Author Comment

    <link rel="stylesheet" rev="stylesheet" href="all.css" media="all">
    <script src="all.js" type="text/javascript" language="javascript" charset="UTF-8"></script>

    include new.html

    My problem is that new.html uses some components of all.css we do not want. if I can do something to new.html uses only his css
    LVL 52

    Expert Comment

    by:Scott Fell, EE MVE
    I'm sorry, I still don't know what you are trying to ask.  

    Can you provide a working sample?  Perhaps a link to an actual test page?

    If what you have it private, that is fine, we don't need your 1000 lines of code anyway.  Just reproduce it with only sample / fake data and post it to a url we can surf to.  If your site is not "live" yet. That is ok too, you will need to eventually make it live and your data is sample data, therefor, you can freely post a link to your sample page.

    I think without that, it is going to be very difficult to understand what you are asking.  I don't know if you mean in include file, import or just some html on a page.

    Thank you.
    LVL 53

    Accepted Solution

    I assume you are using some third party junk written by a developer of limit ability if you have such a problem. If you don't want the page to use some of the styles in style.css either don't put it in the page or override the styles with a second stylesheet.

    OR... take the professional approach of rationalizing the CSS and markup so you do not have such self-limiting conflicts.  Such a thing should never happen in a properly organized development environment so there should be no reason it would ever happen for a live site.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: CSS Specialist

    We don’t have to sell you on the idea of becoming a developer. If you’re you here, you already know it’s one of the most lucrative (and fastest growing) career tracks out there. It’s CSS that allows you to set yourself apart from other web and mobile developers.

    CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
    In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at Browse or search based on font properties or name to find a suitable font for…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now