![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to create a floating box right aligned in CSS. Text should flow around the box (or to the left). The inspiration for the technique came from http://www.quirksmode.org/. Check the link out for an example of my objective. My CSS code is not as elegant though. It creates the border and the background color, but does not right align the floating box with text wrapping around. The text size appears the same as the <p> tag; not 90% smaller. The float and clear CSS tag have me a bit confused as well. Please let me know if you lead me in the right direction. My CSS follows. div class="floater" p>.*</p /div div.floater { width: 35%; margin: 8px 8px; margin-left: 8px; padding: 10px; border: 1px solid #6699FF; background-color: #BBD2FF; font-size: 90%; |
|
clear: right; } |
#3
| |||
| |||
|
|
Robert wrote: I am trying to create a floating box right aligned in CSS. Text should flow around the box (or to the left). The inspiration for the technique came from http://www.quirksmode.org/. Check the link out for an example of my objective. My CSS code is not as elegant though. It creates the border and the background color, but does not right align the floating box with text wrapping around. The text size appears the same as the <p> tag; not 90% smaller. The float and clear CSS tag have me a bit confused as well. Please let me know if you lead me in the right direction. My CSS follows. div class="floater" p>.*</p /div div.floater { width: 35%; margin: 8px 8px; margin-left: 8px; padding: 10px; border: 1px solid #6699FF; background-color: #BBD2FF; font-size: 90%; You're missing the most important bit: float:right; clear: right; } |

#4
| |||
| |||
|
|
Els wrote: You're missing the most important bit: float:right; *waves* stop by for a coffee sometime! ![]() |
#5
| |||
| |||
|
|
Els wrote: Robert wrote: I am trying to create a floating box right aligned in CSS. Text should flow around the box (or to the left). The inspiration for the technique came from http://www.quirksmode.org/. Check the link out for an example of my objective. My CSS code is not as elegant though. It creates the border and the background color, but does not right align the floating box with text wrapping around. The text size appears the same as the <p> tag; not 90% smaller. The float and clear CSS tag have me a bit confused as well. Please let me know if you lead me in the right direction. My CSS follows. div class="floater" p>.*</p /div div.floater { width: 35%; margin: 8px 8px; margin-left: 8px; padding: 10px; border: 1px solid #6699FF; background-color: #BBD2FF; font-size: 90%; You're missing the most important bit: float:right; On my IE6 "contents" displays on the left under the "QuirksMode" text, |
![]() |
| Thread Tools | |
| Display Modes | |
| |