Jump to content


Photo

why does label need display for width and input does not?


  • Faça o login para participar
3 replies to this topic

#1 RyanCaleb

RyanCaleb

    Normal

  • Usuários
  • 70 posts
  • Sexo:Masculino
  • Localidade:Ryan

Posted 23/09/2017, 05:48

Good Morning. I was writing a code and realized that I did not have to write the display property for the width property to work for inputs. On the other hand, I need to write a display property with value inline-block or block for the width property to work for labels. Why does this happen if both are inline by default (according to MDN)?. The section of CSS I wrote, follows below: 

label {
02
 
03
  display: inline-block;
04
  width: 50px;
05
  margin-top: 10px;
06
}
07
 
08
#name, #email {
09
 
10
   width: 280px;
11
   border-top: none;
12
   border-right: none;
13
   border-bottom: 1px dotted #DCDCDC;
14
   border-left: none;
15
   padding: 5px;
16
}

#name and #email are ids for inputs in the html

If necessary, I will post the entire code.

Thank you for your help. 

Promotional Video

 

 


#2 rapedlok

rapedlok

    Expert

  • Usuários
  • 502 posts
  • Sexo:Feminino
  • Localidade:Veley Stream

Posted 17/10/2017, 09:27

Discounts! best ever beauty products progect12.jpg Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked! If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included). buy.png READ MORE Evening lightning patchwork black leather clutch ( 454.70 $) Roberto CavalliRobust Deer 8 inch Adjustable Wrench ( $7.12 )Infinity - Logo Charm Stacked Bangle Bracelet ( 78.00 $)2 Pcs Easy-using Sexy Lip Kiss Bathroom Tube Dispenser Toothpaste Cream Squeezer Free Shipping ( 0.59 $)Rossiya v cifrah. Na skolko podorozhali benzin i diztoplivoSimple desinged vintage pendant lights lamp with 1 light free shipping ( 127.98 $)2016 Fashion Women Cony Hair Dancing Angel Rhinestone Ball Pom Pom Charm Car Keychain Handbag Key Ring Pendant ( 1.72 $)17km 8 pcs set pu leather choker necklaces set for women steampunk collar lace necklace jewelry ( 2.39 $)Brazilian Virgin Hair Body Wave 3 Bundles Human Hair Weave MOBB Hair Products Unprocessed Virgin Brazilian Body Wave Hair Weft ( 67.00 $)Brazilian virgin hair body wave 3pcs 7a unprocessed human hair brazilian hair weave bundles cheap queen hair brazilian body wave ( 57.86 $)Leather blazer jacket ( 524.25 $) ForzieriSexy women's halter asymmetrical flounced printed bikini set ( 10.31 $)Cucumber seeds 100 japan mini cucumber vegetable and fruit seeds for home garden supply cucumis sativus ( 0.50 $)7a brazilian deep curly virgin hair 4pcs unprocessed brazilian virgin hair curly human hair extensions cheap brazilian deep wave ( 84.93 $)Rozental, Ditmar Elyashevich 55.jpg
Discounts! top makeup products 2017

progect12.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
Vintage lace-up and pu leather design formal shoes for men ( 31.61 $)
100 true lily bulbs flower bulbs not lily seeds faint scent bonsai pot lilium plants double ( 1.39 $)
2x led door warning light for bmw m performance logo projector for bmw e60 e90 f10 f15 f16 f30 m3 m5 f01 f02 gt ( 15.00 $)
Hladnokrovnij Lyuk
12v led car parking sensor monitor auto reverse backup radar detector system + led display + 4 sensors + black + silver ( 33.40 $)
Newest spot it board game quality paper with metal box best gift for your friend cards game ( 12.99 $)
XiaoMi Redmi 3 Pro 32GB ROM 4G Smartphone-186.23 $
Ophir 110v 220v air tank compressor w dual action spray gun 0.3 0.5 0.8mm airbrush set for hobby nail art body paint _ac090+069 ( 112.51 $)
Suitcase valiz bag free shipping women travel bags the wedding red box trolley case,new style,combo luggage, lock, mute 20 24 ( 119.00 $)
Brazilian Virgin Hair Straight 3 Bundles Deals Brazilian Straight Virgin Hair Weave 7A Unprocessed Straight Human Hair Extension ( 40.00 $)
Taupe Leather and Suede High Top Sneaker ( 167.50 $)
Astor bordeaux sneaker wlightning bolt logo ( 157.81 $) Marc Jacobs
MultiBootUSB skachat besplatno MultiBootUSB 8.7.1
LONGING LY - 250 5.8G FPV 2.4G 6 Channel 6 Axis Gyro 0.3MP CAM Racing Quadcopter With 7 inch FPV Monitor 349.99$
Resin and Brass Double Viti Small Bangle in Fumoso ( 135.00 $)


78.jpg

#3 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 22/10/2017, 07:06

Provera (Modus Medroxyprogesterone) Cialis Rembourse Pas Amoxicillin For Sale Online Sweetcheeks cialis Prix Cialis Grande Pharmacie Lyonnaise Trazodone Generic Brand

#4 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 05/12/2017, 14:08

Le Viagra Rend Sourd viagra Dove Comprare Cialis Generico Can I Take Two Nexium Over The Counter




3 user(s) are reading this topic

0 membro(s), 3 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq