Quantcast
Channel: HTML Renderer
Viewing all articles
Browse latest Browse all 693

New Post: CSS float problem

$
0
0
Hi,

I've been trying to right float an image for a few hours, but can't get it to work.

HTML
<div style="width:250px; background-color:#FFFF80"><img src="c:\temp\rik1.png" style="float: right; width:100px; height:100px;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</div>
C#
        private void rtb1_TextChanged(object sender, EventArgs e)
        {
            var img = new Bitmap(280, 280);
            using (var g = Graphics.FromImage(img))
            {
                g.Clear(Color.Beige);
                HtmlRender.Render(g, rtb1.Text, new PointF(0, 0), new SizeF(280, 280) );
            }
            pictureBox1.Image = (System.Drawing.Image)img;
        }
Results
Image

Any idea what I'm doing wrong?

Viewing all articles
Browse latest Browse all 693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>