How can you assign multiple css stylesheets to various sections of html content? -


We are looking to refer to many CSS stylesheets within a single page. The header will have a nav bar with a set of stylesheets, while the rest of the page will need to assign a different stylesheet. We do not have permission to change any of the stylesheets. Snippet of the code below:

  & lt; Head & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Meta http-equiv = "X-UA-Compatible" content = "IE = Edge" & gt; & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1" & gt; & Lt; Title & gt; Title & lt; / Title & gt; & Lt ;! - Latest compiled and minified CSS - & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "stylesheet1" & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "stylesheet2" & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "stylesheet3" & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "stylesheet4" & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "stylesheet5" & gt; *** Only apply stylesheet 1 *** & lt ;! - navbar - & gt; & Lt; Div class = "navbar navbar-default" role = "navigation" & gt; & Lt; Div class = "container" & gt; & Lt; Button type = "button" class = "navbar-toggle" data-target = ". Navbar-collapse" & gt; & Lt; span class = "sr-only" & gt; Toggle Navigation & lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; A class = "navbar-brand" href = "#" & gt; & Lt; Img src = "#" alt = "image" & gt; & Lt; / A & gt; & Lt ;! - END NAV - & gt; *** Apply StyleSheat 2 to *** *** - content - & gt; & Lt; Div id = "content" & gt; & Lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt ;! - END material - & gt; Etc .....  

Yes, in the main part of your HTML file, your style sheets Add.

  & lt; Link rel = "stylesheet" type = "text / css" href = "path to your CSS" & gt;   

You can include as many style sheets as you want.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -