Click here to Skip to main content
15,891,695 members
Please Sign up or sign in to vote.
1.11/5 (2 votes)
See more:
this code in the css work in class header but no work in class inputs i don't no what the reason





HTML
<title>Page title
			

				<div class="crud">
					<div class="header">
						<h2>cruds</h2>
						<p>product management system</p>			
					</div>
					
					<div class="inputs">
								
					</div>	
				</div>			



*{
				margin:0;
				padding:0;
}
body{
				background:#222;
		  	color:#fff;
		  font-family:system-ui;
}

.crud{
				width:80%;
				margin:auto;
				
}

.header{
		text-align:center;	
		margin:10px 0;	
		text-transform:uppercase;
}
.inputs{
				width:100%;
				border:none;
			
}


What I have tried:

i alot tried but i really i can't know what reason
Posted
Updated 14-Mar-22 21:53pm
v2

1 solution

you have to put the styling in between the tags like this
HTML
<pre><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Page title</title>
</head>
<style>
    *{
				margin:0;
				padding:0;
}
body{
				background:#222;
		  	color:#fff;
		  font-family:system-ui;
}

.crud{
				width:80%;
				margin:auto;
				
}

.header{
		text-align:center;	
		margin:10px 0;	
		text-transform:uppercase;
}
.inputs{
				width:100%;
				border:none;
			
}
</style>
<body>
    <div class="crud">
        <div class="header">
            <h2>cruds</h2>
            <p>product management system</p>
        </div>
    <div class="inputs">

    </div>
    </div>
</body>
</html>



link to how to use css
How to add CSS[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900