otuatail Posted June 22, 2010 Share Posted June 22, 2010 Hi I have a problem with a newspaper style page. I simply want text in a second div to wrap the text in a first div. Is thi possible http://www.des-otoole.co.uk/breakingnews.php TIA Desmond Quote Link to comment Share on other sites More sharing options...
joePHP Posted June 22, 2010 Share Posted June 22, 2010 Hi, Don't set the height but set overflow: hidden; Quote Link to comment Share on other sites More sharing options...
otuatail Posted June 22, 2010 Author Share Posted June 22, 2010 Sorry No that dosn't work. Tried this on both enclosed divs. Desmond. Quote Link to comment Share on other sites More sharing options...
otuatail Posted June 22, 2010 Author Share Posted June 22, 2010 why would I want to hide anything anyway? Quote Link to comment Share on other sites More sharing options...
joePHP Posted June 22, 2010 Share Posted June 22, 2010 Maybe I didn't understand your question. I attached how yours looks and how mines with my code. Let me know if this is what you mean <div style="border: 1px dashed rgb(119, 0, 0); width: 450px; overflow: hidden;"> <div style="float: left; width: 130px; border-width: 1px; height: 30px; font-size: 27px; color: red;">News Flash</div> <div style="float: left; width: 318px; border-width: 1px; height: 90px; padding: 0px 2px;">This is a sample line to show how text within a floting div can wrap another div. This is a sample line to show how text within a floting div can wrap another div.</div> </div> [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
haku Posted June 23, 2010 Share Posted June 23, 2010 Setting the overflow to hidden would just hide the text that doesn't fit. That usually won't make sense. To wrap text around other text you can do this: <div id="container"> <h2>News Flash</h2> <p>Nullam vel elit in urna pulvinar adipiscing. Nam sapien diam, pretium sit amet dictum sed; placerat eu est.</p> </div> h2 { float:left; } With this code, the text in the <p> tag will wrap around the text in the <h2> tag. Quote Link to comment Share on other sites More sharing options...
Ruzzas Posted June 23, 2010 Share Posted June 23, 2010 Your height is too low, Thats why the test goes out. Quote Link to comment Share on other sites More sharing options...
otuatail Posted June 23, 2010 Author Share Posted June 23, 2010 I thought I had made it clear about text wrapping, obviusly not. If you read a newspaper you would understand. What I wanted in http://www.des-otoole.co.uk/breakingnews.php was News Flash This is a sample line to show how text within a floting div can wrap another div. This is a sample line to show how text within a floting div can wrap another div. This means in my link lines 3 and 4 go underneith the red text. An example of text wrapping. Used in Microsoft office as well. Quote Link to comment Share on other sites More sharing options...
otuatail Posted June 23, 2010 Author Share Posted June 23, 2010 Your height is too low, Thats why the test goes out. The text does not go out, there is not enough text to go out. Quote Link to comment Share on other sites More sharing options...
otuatail Posted June 23, 2010 Author Share Posted June 23, 2010 sorted. The right side can't be a div. Plain text only. Quote Link to comment Share on other sites More sharing options...
haku Posted June 23, 2010 Share Posted June 23, 2010 Or it can be in a <p> tag like the example I showed you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.