Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

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.

tabelle auf screen zentrieren

Empfohlene Antworten

Veröffentlicht

Was ist die beste (browserunabhängige) Möglichkeit, eine 500px breite Tabelle auf dem Screen zu zentrieren? Am besten ohne Frames und ohne JS...

Hi!

Diese Seite erklärt 's: http://www.quirksmode.org/css/centering.html

Vertical centering is only possible for content of TD's. Don't ask me why, I disagree strongly, but the problem is there and should be solved.

I diagree with that! Zentrieren ist möglich auch ohne TDs.


<html>

<head><title>Test</title>


</head>

<body>


<div style="width: 500px; margin: 20px auto;">

<table border = "1">

  <colgroups>

    <col width="100">

    <col width="100">

    <col width="100">

    <col width="100">

    <col width="100">

  </colgroups>

  <tr><td>A</td><td>A</td><td>A</td><td>A</td><td>A</td></tr>

  <tr><td>B</td><td>B</td><td>B</td><td>B</td><td>B</td></tr>

</table>

</div>


</body>

</html>

allerdings macht der IE auto erst ab Version 6

:rolleyes:

what about <table align="center"> ?

what about <table align="center"> ?

das ist nicht XHTML konform.

Sollte durch die style eingenschaft ersetzt werden.

allerdings bewirk

<table style="align:center">

nicht das gleiche wie das o.g.

allerdings bewirk

<table style="align:center">

nicht das gleiche wie das o.g.

...liegt vielleicht daran, dass es eine css Eigenschaft "align" nicht gibt, du meinst "text-align" ;-)

Gruß, Tobias

aber auch <table style="text-align:center;"> macht bei mit nicht das, was es soll. schneinbar macht es garnichts, wahrscheinlich bezieht sich text-align auf der ausrichtung INNERHALB der tabelle....

...liegt vielleicht daran, dass es eine css Eigenschaft "align" nicht gibt, du meinst "text-align" ;-)

Gruß, Tobias

jo heisst text-align, aber der rest meiner Aussagen stimmt trotzden,.... :floet:

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.