Jump to content
php.lv forumi

<ul> margin: 0 auto;


EN`

Recommended Posts

Pirmo reizi sanāca ļoti piedomāt pie <ul> centrēšanas. Problēma tāda, ka <ul> width nav statisks, so margin:0 auto; nestrādā, margin-left nav jēgas taisīt, jo objekts nebūs vienmēr nocentrēts.

Tā arī neizdomāju kā var viņu nocentrēt.. Ir kādas idejas?

 

Izskatās apmēram šādi:

 

<ul><li>1</li></ul> 

li daudzums palielinās vai samazinās

<ul><li>1</li><li>2</li></ul>

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.

Loading...
×
×
  • Create New...