| Floating not working as expected I can't believe I've never encountered this before |
MatthewHSE

msg:3585029 | 2:51 pm on Feb 26, 2008 (gmt 0) | I'm experienced enough with CSS that I should know the answer to this. Maybe I'm just having a mind-block, but in any case, it's got me baffled. Here's the code: <html> <head> <title>Float issue</title> <style type="text/css"> #breadcrumbs { font: 8pt/8pt normal verdana, arial, sans-serif; padding: 3px; margin: 0 10px 10px; border: 1px solid #a9a9a9; background: #dcdde9; } #sitemap { float: right; font-size: 7pt; } </style> </head> <body> <div id="breadcrumbs"> <strong>You Are Here:</strong> Path > To > Current > Page <a id="sitemap" href="sitemap.html">Site Map</a> </div> </body> </html> |
| If you try the code, you'll see that the "Site Map" link is not being enclosed in the #breadcrumbs div. In Firefox, it's kind of half-in and half-out. In IE, it's all the way outside the border below the div. I wanted it to be enclosed in the div, just like the rest of the text, but at the right-hand edge of it. This should be simple, and I should at least be able to figure out what's actually going on...maybe I'm just out of practice. Thanks in advance, Matthew
|
|