Jump to content

Problema centrare div-uri in css


Gabriel Stefan

Recommended Posts

Buna ziua am intampinat o problema .

As dori sa stiu ce ar trebui sa fac ca atunci cand fac fereastra mai mica si chenarele din aceasta imagine sa se centreze adica sa nu ramana fixate in acelasi loc chiar daca browseru se micsoreaza.

Asa cand este pe tot ecranul : http://i.imgur.com/OO1tJOD.png

Asta mi se intampla cand micsorez marimea browserului : http://i.imgur.com/wN9x4J4.png

 

Link to comment
Share on other sites

  • Moderators

Nu mai folosi pixeli la width si nu vei mai avea problema aia. Incearca cu %.

Daca ai nevoie de pixeli fixi, va trebui sa inveti Media Queries.

http://www.w3schools.com/cssref/css3_pr_mediaquery.asp

PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Link to comment
Share on other sites

  • Moderators

Daca ai 3 elemente, si le zici 70%*3 = 210%. Maxim-ul fiind 100% pe rand, e normal sa nu incapa. Incearca cu 33.33333% la fiecare div.

 

Sau daca vrei sa-i dai separat la fiecare, cum a zis Stefan, cu id la fiecare poti.

PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.