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.

[css] float bug?

Empfohlene Antworten

Veröffentlicht

hi und hallo,

ich habe eine ganz einfache sache, der mir aber leider nun seit 3 stunden die haare zu berge stehen lässt.

ich habe ein navigations div mit float: left

und ein content div mit einem margin-left das grösser als die breite des navigations divs ist.

ergo soll der content rechts neben der navigation runterlaufen ohne, wenn er länger als das navigationsdiv wird, unter das navDiv zu laufen.

klappt soweit ganz gut. nur verrutscht mir im IE in der zeile ab der der content die höhe des navDivs überschreitet die schrift...???

ein bildchen dazu:

bug.gif

"Web" steht eigentlich genau unter "Web" aber wie man sieht ist das ganze verrutscht.

der code dazu


#nav {

	width: 220px;

	float: left;

	margin-left: -1px;

	padding: 10px;

	border: 1px solid;

}


#content {

	padding: 10px;

	margin-left: 250px;

	border-left: 1px solid #006;

}


<div id="nav">

	This is the Navigation DIV.

</div>


<div id="content">

	hallo content

	<br>Web	hallo content

	<br>Web hallo content

	<br>Web

</div>

p.s. bitte kommt mir jetzt keiner mit "benutz doch tabellen" hihi ;)

bin für jede hilfe dankbar....

hmm dieser pixel ist echt mal hartnäckig.

ob das ein bug ist, wage ich allerdings nicht zu urteilen, da ich die spezifikation von float nicht kenne.

ich bekomm den pixel auch nicht weg und kann dir daher nur folgenden workaround anbieten, obwohl ich nicht weis, ob das in deinem tatsächlichen Layout praktikabel ist.


<style type="text/css">

#nav {

	width: 220px;

	margin-left: -1px;

	padding: 10px;

	border: 1px solid;

/*

	float: left;



*/

	position: absolute; 

	left: 9px;

	top: 15px;


}


#content {

	padding: 10px;

	border-left: 1px solid #006;

	margin-left: 275px;

}

</style>


</head>


<div id="nav">

	This is the Navigation DIV.

</div>


<div id="content">

	hallo content

	<br>Web	hallo content

	<br>Web hallo content

	<br>Web

</div>

ouuuuuuuhhhhh das ist klasse. natürlich, oder besser: zum glück!, kann ich in meinem fall mit "absolute" werten arbeiten. mensch warum bin ich da nicht gleich draufgekommen *brettVormKopf*.

muss nur ein bisschen was anpassen und dann komm ich hin.

vielen dank!

trotzdem wäre mir, rein vom verständnis her noch wichtig wieso das im IE nicht so klappt wie ich das beschrieben habe. der FF machts ohne mucken.

trotzdem wäre mir, rein vom verständnis her noch wichtig wieso das im IE nicht so klappt wie ich das beschrieben habe. der FF machts ohne mucken.

die wege des IE sind eben unergründlich. ;)

nein spaß beiseite, ich weiß es zumindest nicht.

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.