judkels Posted August 19, 2010 Report Share Posted August 19, 2010 This really shows my ignorance - but what is the best way to make my text line up properly. I have a simple 'contact us' page with the address to the left in one div floated and the email and website details in another div floated to the right side of the page (well actually I may have them both floated left but with a margin set) Anyway this seems effective except lining up the text correctly with in the divs. Indenting just the 4 lower lines but keeping them nicely lining up with 'name of company' bit above. I'd be grateful for ideas on the best way to do this - I'm sure I shouldn't be using all those spaces which don't work perfectly anyway. <p><strong>Post: </strong>name of company<br /> address line 1<br /> address line 2<br /> address line 3<br /> postcode </p> many many thanks Judy Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 19, 2010 Report Share Posted August 19, 2010 Add a class to your p tag and apply a margin-left to that class in your CSS. Quote Link to comment Share on other sites More sharing options...
BeeDev Posted August 19, 2010 Report Share Posted August 19, 2010 I'd suggest using <table> Quote Link to comment Share on other sites More sharing options...
newseed Posted August 19, 2010 Report Share Posted August 19, 2010 Better yet, use unordered list. <p>Name of Company</p> <ul> <li>Address Line 1</li> <li>Address Line 1</li> <li>Address Line 1</li> </ul> Use some css to remove the bullets, adjust the paddings/margins, etc. 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.
Note: Your post will require moderator approval before it will be visible.