עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

מרכוז תפריט CSS

Featured Replies

פורסם

יש לי תפריט שאני רוצה למרכז אותו כמו שיש לדוגמה במערכת joomla (למי שלא מכיר, התפריט שלהם ממורכז באמצע הדף, לא משנה כמה קישורים יש ומה הרזולוציה של המסך)

התפריט שלי בנוי כך:


<ul id="quickJumpMenu">
<li class="selected"><a href="">selected link</a></li>
<li><a href="">link</a></li>
<li><a href="">link</a></li>
<li><a href="">link</a></li>
</ul>


#quickJumpMenu {
width: 984px;
height: 25px;
margin: 0 auto;
background: #fff;
border: 1px solid #eeeeee;
}
#quickJumpMenu li {
float: right;
list-style: none;
line-height: 25px;
font-size: 12px;
padding: 0;
}
#quickJumpMenu li:hover {
background:#fff url('images/arrow.png') no-repeat center bottom;
border-bottom: solid 1px #afafaf;
}
#quickJumpMenu li.selected {
background:#fff url('images/arrow.png') no-repeat center bottom;
/*border-bottom: solid 1px #afafaf;*/
}
#quickJumpMenu li a {
margin: 0 auto;
padding: 0 auto;
margin-right:10px;
padding-left:10px;
color:#444;
border-left:solid 1px #eee;
height: 25px;
}
#quickJumpMenu li.last a {
border: none;
}
#quickJumpMenu li:hover a {
color:#666;
}

מה אני יכול לעשות כדי למרכז אותו?

תודה לעוזרים :)

  • 3 שבועות מאוחר יותר...
פורסם

הקוד שכתבת ל css הוא נכון, אבל מיועד למרכז אוביקטים כלליים יותר. אם תשים את כל הבלוק הזה בתוך div או בטבלה, ואז תיתן להם את ה style שכתבת, זה יעבוד.

מה גם, יכול להיות שיש לך בעיות כי לא הוספת doctype ואז זה לא יעבוד באקספלורר.

כדי למרכז טקסט משתמשים ב text-align:center

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.