Jump to content


Photo

Div Centralizada


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

#1 Rustin

Rustin

    Parradise

  • Usuários
  • 578 posts
  • Sexo:Não informado

Posted 17/07/2005, 23:05

É o seguinte: o tal de tableless tá me dando um nó no cérebro :(
Mas eu sei que a galera vai ajudar :P

Quero fazer com que uma div de 500 pixels de largura fique centralizada horizontal e verticalmente. A primeira parte eu já consegui, mas a segunda não teve jeito.

Desde já, valeu (y)
"O fracasso não é o contrário do sucesso, mas sua fonte de inspiração". Thomas Edison

#2 redstyle

redstyle

    Expert

  • Usuários
  • 540 posts
  • Sexo:Masculino

Posted 18/07/2005, 09:41

#meio {
	position:absolute;
	top:50%;
	left:50%;
	width:500px;
	height:500px;
	margin-left:-250px;
	margin-top:-250px;
}

Fiz uma div de 500 por 500 ai se vc quiser é só mudar a altura.

[]'s

Conheça meu blog para Aprender Laravel (Framework PHP)


#3 Rustin

Rustin

    Parradise

  • Usuários
  • 578 posts
  • Sexo:Não informado

Posted 18/07/2005, 10:00

Ficou no topo, velho.
Sei não, mas acho que tem que mexer na altura do corpo. Como é que eu não sei :(
<html>

	<head>
		<title>CenterDIV</title>
		<style type="text/css">

			.meio {
				position: absolute;
				top: 50%;
				left: 50%;
				width: 500px;
				height: 100px;
				margin-left: -250px;
				margin-top: -250px;
				background-color: #ccc
			}

		</style>
	</head>

	<body>
		<div class="meio">Rustin</div>
	</body>

</html>

"O fracasso não é o contrário do sucesso, mas sua fonte de inspiração". Thomas Edison

#4 redstyle

redstyle

    Expert

  • Usuários
  • 540 posts
  • Sexo:Masculino

Posted 18/07/2005, 13:06

.meio {
position: absolute;
top: 50%;
left: 50%;
width: 500px;
height: 100px;
margin-left: -250px;
margin-top: -50px;
background-color: #ccc
}

Repare que a margin-top e margin-lef deve ser a metade negativo do tamanho e altura.

Troque a css por essa acima e veja que ficou no meio.

Se vc alterar o tamanho lateral e altura, vc deve mudar tb as margin's

Falowz!!

Conheça meu blog para Aprender Laravel (Framework PHP)


#5 Rustin

Rustin

    Parradise

  • Usuários
  • 578 posts
  • Sexo:Não informado

Posted 18/07/2005, 13:43

Beleza, funcionou :)
O problema é que só vai funcionar quando a div tiver altura definida, o que não é o meu caso :(

Alguém teria uma alternativa?
"O fracasso não é o contrário do sucesso, mas sua fonte de inspiração". Thomas Edison

#6 redstyle

redstyle

    Expert

  • Usuários
  • 540 posts
  • Sexo:Masculino

Posted 18/07/2005, 23:38

mais ai teria que ser alguma coisa dinâmica.
O problema e descobrir a quantidade de pixel usado no layout de acordo com o conteúdo...ainda mais se o site for de atualização dinâmica.

Ps .: Mas se o site utilizar 600px por exemplode altura porque ter a div geral centralizada verticalmente?

Conheça meu blog para Aprender Laravel (Framework PHP)


#7 Rustin

Rustin

    Parradise

  • Usuários
  • 578 posts
  • Sexo:Não informado

Posted 20/07/2005, 17:36

Porque a altura máxima da DIV, pelos meus cálculos, será de 100, 200 pixels, ficando horrível no topo. Por isso a proposta é centralizar (y)
"O fracasso não é o contrário do sucesso, mas sua fonte de inspiração". Thomas Edison

#8 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 11724 posts

Posted 23/09/2017, 08:41

Buy Online Lasix online pharmacy Buy Metformin Medicine Dosage Of Cephalexin For Goats Cephalexin 500 Mg Capsuls cialis Viagra Salud
Cialis Ou Acheter Forum generic cialis Find Stendra Discount With Free Shipping Without Rx
Vigria Pills Cialis Y Vih
Under Eye <a href=http://cialtobuy.com>cialis</a> Buying Zithromax Online Overnight Shipping
Genaric Viagra Gold cialis Clomid Absence De Glaire Cervicale
Erectile Dysfunction Medications Online Ciprofloxacin 500mg To Buy Propecia Generic Finasteride Hair Growth
Noprescriptiondrugs <a href=http://cialtobuy.com>generic cialis</a> Canada Pharmacy Tadacip 10mg Paypal

#9 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 11724 posts

Posted 08/10/2017, 19:56

Generic Levitra Professional 20 Mg Levitra Lloyds Pharmacy Donde Comprar Viagra En Sevilla viagra Aurochem Viagra Review Venta Kamagra Entrega
Buy Legit Accutane Cialis Effets Secondaires Forum Viagra Venta Muy Barata generic levitra Legally Levaquin Where To Buy Discount Overnight Shipping Buy Levothyroxine 125 Mcg Zithromax Information
Cialis Et Ulcere buy viagra online Donde Comprar Viagra En Usa Viagra Auswirkungen
Does Amoxicillin Treat Clymidia Cialis Usa Pharmacy Does Generic Viagra Really Exist levitra 40mg bulk prices El Cialis Para Que Sirve

#10 RonsisM

RonsisM

    Super Veterano

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

Posted 09/10/2017, 00:24

Viagra En Ligne Moins Cher Increased Libido Finasteride Propecia cialis Celis Pills Cialis Authentique Prix

#11 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 11724 posts

Posted 09/10/2017, 01:11

Picrolax levitra in canada discount code Levitra Precio En Farmacia
Buy Viagra Line Cialis En Inde online pharmacy Levitra Acquisto In Contrassegno Acheter Propecia
Canada Branded Viagra Propecia Buy Australia cheap 80 mg vardenafil hcl Viagra Pillen Preis Cialis Et Arythmie

#12 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 11724 posts

Posted 26/10/2017, 10:41

Ciprofloxacino 500 Mg Dosis Order Doxycycline Geschichte Levitra viagra online pharmacy Viagra Pfizer Tabletten Achat Amoxicillin Tablette Pharmacie Generika Cialis Forum
Mail Order Fluoxetine buy viagra Order Lasix Online Next Day Delivery Acheter Baclofene En France
Colchicine Tablet 0.6 Mg viagra Non Prescription Lithium Cheapest Levitra Professional
Retin A Without Prescription Usa viagra Allergic Itching Due To Amoxicillin Acquista Cialis On Line

#13 sapedlok

sapedlok

    24 Horas

  • Usuários
  • 420 posts
  • Sexo:Masculino
  • Localidade:Veley Stream

Posted 27/10/2017, 07:50

Discounts! best product ideas progect11.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 болт гбц ваз3pcs brazilian body wave hair extensions christmas deals 7a jet black virgin hair bundles tissage bresilienne human hair weave ( 55.30 $)HomerlandLight copper round clutch ( 161.76 $) Love MoschinoGryadushie vojnidraw +and colour переводMobile Phone Housing For Nokia Lumia 730 735 Battery Back Cover Case For Microsoft Lumia 735 730 Back Housing Replacement ( 4.29 $)17KM Brand designer New sell Fashion Retro style Colorful gem rhinestone flower choker necklace Statement jewelry women ( 4.90 $)Blue Herringbone Dress Shirt ( 44.50 $)10PCSLot UC3843B UC3843BN UC3843AN UC3843 3843 DIP8 DIP PWM Switching Power Converter Wholesale Electronic ( 1.25 $)Mma shorts kick boxing muay thai shorts trunks mma cheap shorts camo muay thai sanda boxe fight wear yokkao bermuda mma ( 60.00 $)скачать бателфилд вьетнам 2Ethnic women's tribal print long sleeves tied-front blouse ( 14.55 $)7a mink brazilian virgin hair body wave 4 bundles brazilian body wave rosa hair products brizilian virgin hair human hair weave ( 40.00 $)St.Barth Tan Perforated Nubuck and Leather Belt ( 195.00 $) 108.jpg
Discounts! beauty product awards

progect11.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
купить аккаунт бателфилд 1
Ugarnie Prikoli iyul 2016 (Video)
Xiaomi Mi Max 32GB ROM 4G Phablet-293.18 $
battlefield 3 premium купить ключ дешево
Vinsic terminator p3 20000mah power bank qc3.0 quick charge 2.4a dual output with type c port for samsung, iphone, xiaomi ( 65.98 $)
Tollcuudda Solar Poverbank Mobile Phone Power Bank Cell Pover Portable Charger Battery External Cellphone Mi Powerbank 10000mah ( 42.98 $)
Peruvian full lace wigs human hair with baby hair full lace human hair wigs for black women body wave lace front human hair wigs ( 131.30 $)
Pu leather bags handbags women famous brands big women crossbody bag trunk tote designer shoulder bag ladies large bolsos mujer ( 38.57 $)
Delivery of sushi and rolls around the clock in Moscow - a Japanese restaurant Niyama
nike flyknit max black
2015 new kerui gsm alarm systems home alarm systems security englishrussianspanish voice gsm alarm security fire detector ( 116.36 $)
All Star Black Canvas High Top Sneaker ( 75.00 $)
магазин богатырь москва
боди скраб +для тела
Bronze Midi Ring wMouth ( 87.50 $)


92.png
Discounts! cool product design

progect11.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
Original Smok X Cube II VV VW Box Mod-61.55 $
22 frets one piecetiger flame material canadian maple wood color electric guitar neck wholesale guitar parts accessories ( 138.57 $)
Inglourious Basterds Django Unchained Reservoir Dogs Kill Bill Quentin Tarantino Poster Videos ( 1.70 $)
Trendy bat sleeve jewel neck pure color t-shirt for women ( 9.48 $)
Electric Blue Suede Platform Tiger Espadrilles ( 175.00 $)
Trendy suede and zipper design women's sandals ( 27.87 $)
New hot intelligent wireless business house gsm alarm system wireless emergency button, 4 wireless fire detectors free ship ( 111.64 $)
Charming heat resistant synthetic soft curly mix color capless women's wig ( 12.87 $)
Original Youde 5 Meters 26AWG + 0.5 x 0.1mm 2 Wires Twisted Kanthal Resistance Wire Roll E - cigarette Coils for Atomizers DIY ( $3.05 )
Agent Provocateur - RS"RESâ PEP°R"SRS"R # Rers RSS'-We°RIR°R·RER PI R Rssii
Brazilian body wave 3 bundles brazilian virgin hair body wave wet and wavy virgin brazilian hair weave bundles remy human hair ( 45.00 $)
DHD X - RUN C1 Wall Climbing Car IR Control Climbing Mode-13.45 $
3pcsset Fashion Flower Newborn Baby Girl Clothes Bodysuit Pants Cardigan Wear Suit Infant Costume Kit Girl Children Clothing ( 10.50 $)
Original SJCAM Foldable Selfie Stick-5.47 $
15Pcs Makeup Brush Professional Women Foundation Eyeshadow Eyeliner Lip Brand Make Up Cosmetic Pincel Maquiagem Eye Brushes Set ( 4.30 $)


66bb.jpg

#14 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 11724 posts

Posted 06/11/2017, 10:26

Propecia Chimica By Requip Online Generic Propecia Review online pharmacy Pastilla Cialis Con Alcohol Prix Kamagra Marseille

#15 RonsisM

RonsisM

    Super Veterano

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

Posted 07/11/2017, 07:39

Viagra Rezeptfrei Ohne Kreditkarte cialis Canadian Pharmacie For Cialis Levitra Kaufen Berlin Diabetes Meds Online No Script




0 user(s) are reading this topic

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

IPB Skin By Virteq