View Full Version : دسترسی به اولین و آخرین عنصر
omidparkour
دوشنبه 16 تیر 1393, 03:47 صبح
سلام
من چند تا section زیر هم دارم و میخوام اولین Section و آخرین section رو فاصله از بالاشون رو زیاد کنم
چجوری میتونم دسترسی پیدا کنم؟؟؟؟؟
cancerr
دوشنبه 16 تیر 1393, 08:17 صبح
selector:last-child
{
}
selector:first-child{}
!
!
omidparkour
دوشنبه 16 تیر 1393, 15:17 عصر
first-child کار نمیکنه چرا؟؟
دانیال دزفولی
دوشنبه 16 تیر 1393, 15:55 عصر
first-child کار نمیکنه چرا؟؟
قبلش باید 2 نقطه بذاری
با اینم میشه
:nth-child(1)
omidparkour
دوشنبه 16 تیر 1393, 16:12 عصر
نخیرا
نمیشه
نمیدونم چرا هیچ تغییری نمیکنه
این کد رو میزنم
#post:nth-child(1){
width: 60%;
height:auto;
max-height:700px;
float: left;
margin-left: 128px;
margin-top: 50px;
}
omidparkour
سه شنبه 17 تیر 1393, 03:19 صبح
مشکل چیه؟؟
#post{
width: 60%;
height:auto;
max-height:700px;
float: left;
margin-left: 128px;
margin-top: 20px;
}
#post:nth-child(1){
width: 60%;
height:auto;
max-height:700px;
float: left;
margin-left: 128px;
margin-top: 50px;
}
#post:last-child{
width: 60%;
height:auto;
max-height:700px;
float: left;
margin-left: 128px;
margin-bottom: 100px;
}
qartalonline
پنج شنبه 19 تیر 1393, 09:06 صبح
مشکل اینه که کدهاتون مشکل داره. از آی.دی #post استفاده کردید کجا هستش؟ نحوه استفاده شما از selector ها اشتباهه، همه کدهاتون رو بذارید و بگید دقیقا چی می خواید.
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.