My masterpage code:
<head runat="server">
<title>System</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<style>
.masterfixed { table-layout:fixed; color:rebeccapurple}
.masterfixed td { overflow: hidden;}
</style>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" >
<link href="bootstrap/css/masdesign.css" rel="stylesheet" type="text/css" >
I only want my colour on my masterpage. But why does this apply to all my font in my contentplaceholder. Please help thanks.
You could put your contentplaceholder
in a div and give the div the CSS class or the style you want:
<div style="font:bold 12px arial;color:#000000">
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</div>
If it does not work, try it with a !important
at the end of each style:
sytle="color:#000000 !important"
This makes sure that the div uses this style and not a style defined in a CSS class.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.