Scaryminds Posted March 5, 2011 Share Posted March 5, 2011 Trying to put together a widget for my website where I can indicate what my reading queue is currently. First problem is this CSS .textborder {border: 1px solid black; padding: 2px;} How do I restrict the length of the border, as I don't want it to stretch across the page. Quote Link to comment https://forums.phpfreaks.com/topic/229625-css-border-around-text-limiting-the-horizontal-length-of-the-border/ Share on other sites More sharing options...
Scaryminds Posted March 5, 2011 Author Share Posted March 5, 2011 Cancel this one, wrote a bunch more css to get a heading etc and simply defined size in there. Now I have to work out how to get two things to float right, with the second one directly under the first .... aaarrrggghhhhh! Quote Link to comment https://forums.phpfreaks.com/topic/229625-css-border-around-text-limiting-the-horizontal-length-of-the-border/#findComment-1183199 Share on other sites More sharing options...
cssfreakie Posted March 5, 2011 Share Posted March 5, 2011 you could have done this with display:block; Quote Link to comment https://forums.phpfreaks.com/topic/229625-css-border-around-text-limiting-the-horizontal-length-of-the-border/#findComment-1183384 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.