Centrera img i div [CSS]|Programmering / Grafisk formgivning|Forum|Nordichardware

Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
The forums are currently locked and only available for read only access
sp_Feed sp_TopicIcon
Centrera img i div [CSS]
joaj
Siktar mot toppen
Medlem
Forum Posts: 57
Member Since:
August 28, 2003
sp_UserOfflineSmall Offline
1
September 1, 2005 - 1:44 pm
sp_Permalink sp_Print

Har en div med width: 100%. I den skall jag placera en bild och jag vill ha den centrerad horisontellt.
Hur gör jag?

zcorpan
Kommer du hit ofta?
Medlem
Forum Posts: 848
Member Since:
December 26, 2003
sp_UserOfflineSmall Offline
944878
September 1, 2005 - 5:29 pm
sp_Permalink sp_Print
  1. div { text-align:center; }
  2. div img { display:block; margin:0 auto; }

🙂

joaj
Siktar mot toppen
Medlem
Forum Posts: 57
Member Since:
August 28, 2003
sp_UserOfflineSmall Offline
946317
September 5, 2005 - 7:36 am
sp_Permalink sp_Print

Tack zcorpan, det var "text-align:center; " som jag hade missat.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1030
Currently Online:
Guest(s) 412
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Andreas Galistel: 16287
Jonas Klar: 15897
ilg@dd: 10810
Nyhet: 10607
Mind: 10550
Ctrl: 10355
Gueno: 9881
Guest: 9344
Snorch: 8881
Callister: 8468
Newest Members:
PetrbonFU PetrbonFU
Karine Bembry
Dolores Mcdaniels
Anibal McLeish
Francisca Alt
Alfie Everhart
Lester Huitt
Orlando Jorgensen
Mikki Lundgren
Dakota Kozlowski
Forum Stats:
Groups: 11
Forums: 59
Topics: 146630
Posts: 1300967

 

Member Stats:
Guest Posters: 2
Members: 79425
Moderators: 0
Admins: 11
Administrators: nordicadmin, Henrik Berntsson, Anton Karmehed, Carl Holmberg, Joel Oscarsson, Mikael Linnér, Mikael Schwartz, Andreas Paulsson, Nickebjrk, Mattias Pettersson, EmxL