Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania
Viewing all articles
Browse latest Browse all 65225

Nie działa nth-child().

$
0
0

Problem banalny, ale nie rozumiem czemu tak jest. Mam kod:
 

<div class="introductionOfWebsite">
		<div class="width">
			<h2>Bring your Big Data to Life With Craft Lance</h2>
			<p>Blue Lance transforms your company's data into rich visuals for you to collect and organize so you can focus on what matters to you. Stay in the know, spot trends as they happen, and push your business further.</p>
			<img src="laptop.png" alt="laptop">

			<input type="text" placeholder="Enter Your Emile Adress">
			<input type="button" value="Use it free">
			<p>By clicking Use it free, you agree to the  BlueLance Terms of Service.</p>
		</div>
	</div>

oraz:

 

.introductionOfWebsite{
	padding-top: 90px;
}

h2{
	font-size: 43px;
	text-align: center;
}

.introductionOfWebsite p:nth-child(1){
	text-align: center;
	width: 800px;
	margin: 0 auto;
}

.introductionOfWebsite img{
	width: 390px;
	height: 251px;
	position: relative;
	left: 400px;
}

.introductionOfWebsite input[type="text"]{
	display: block;
}

Chcę wystylizować pierwszy p, ale first-child nie działa. Wiem, że teoretycznie mógłbym tam walnąć id i po problemie, ale chciałbym zrozumieć czemu kiedy w css pod .introductionOfWebsite p:nth-child(1) piszę cokolwiek to nic nie działa...
Swoją drogą 0 auto przy marginie od img też nie działa - choć mam i width i hight...


Viewing all articles
Browse latest Browse all 65225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>