[thelist] Easy CSS Riddle
Joshua Olson
joshua at waetech.com
Mon May 10 16:17:20 CDT 2004
> -----Original Message-----
> From: John.Brooking at sappi.com
> Sent: Monday, May 10, 2004 5:02 PM
>
> Easy for someone, at least. Given the following simple example
> page (which I
> have posted to http://www.shoestringcms.com/test.html):
> 1) Why is it on the next line, even though SPAN is an in-line tag? Is
> this one of those browser-compatibility issues? Or am I
> misunderstanding the
> CSS model?
John,
The floated element should be placed BEFORE the non-floated element.
> 3) Extra credit: What if I wanted some text on the left, the
> right, *and* in the middle, all on the same line?
As such?
<html>
<body>
<div style="float: left; width: 30%; background-color: green;">Text
1</div>
<div style="width: 30%; float: right; text-align: right;
background-color: red;">Text 2</div>
<div style="text-align: center">center</div>
</body>
</html>
<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168
More information about the thelist
mailing list