Jump to content
xisto Community
Sign in to follow this  
shadowx

How Can I Indent Text A Specified Amount (every line, not just the first)

Recommended Posts

Hey all

I'm working on several pages in HTML using external CSS formatting and i need a table for navigation along the left hand side with links in it and i want the text to sit next to this table to the right the entire length of the page even though the table will end, probably about half way down.

eg:

________| text text text
____| text text text
____| text text text
____| text text text
------text text text
------text text text

(the "-"'s are to add spacing as i cant use multiple spaces. See how the text stays in line and doesn't revert to going back to the left hand side of the browser window as it normally would)

The problems im having are:
1) text-indent only indents the first line of every paragraph not every line of the text
2) position: absolute/relative mean that i have horizontal scrolling even though the text doesn't go over the browser window width, it seems there is unseen space which makes the page scroll horizontally.
3) i don't really want my table to stretch to fit the entire page as it has its own background colour and wouldn't look too great (but if this is the only way i can use cells with no bgcolor property methinks or add another hidden table to act as padding but then i have another problem with how do i make sure that table goes down as far as the text and not farther/shorter? if you can help me solve that then i can use this method)

the CSS i used for the position attribute is as follows:
p{color: #6e6edb; font-family: Century Gothic, Century, Arial, System, Times New Roman; [b]position:relative; left:150;} [/b]

if theres something i can do to change that code then im open to suggestions!

Thanks

Share this post


Link to post
Share on other sites

Have you tried putting a margin-left on the div or block of code that you want indented?I would float:left the div with the links and then margin:left the div with the content a similar amount as the width of the float.Post back if you need a code snippet.

Share this post


Link to post
Share on other sites

Genius! Works perfectly, just used a DIV with margin-left and it works fine. Cant believe it was so simple, thought it was going to be my downfall and ive had the same problem so many times but never found this solution lolThanks :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.