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

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > CSS (Cascading Style Sheets)

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

shadowx
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:
QUOTE

____
____| 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:
CODE

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

 

 

 


Reply

jlhaslip
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.

Reply

BuffaloHELP
Formatting style of PADDING would work as well.

CODE

<div style="padding: 0 0 0 10px;">

where the sequence goes: top, right, bottom, left

Reply

shadowx
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 lol

Thanks smile.gif

Reply

BuffaloHELP
Topic resolved. Please PM a moderator if you wish to continue this topic.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. text-indent indenting everyline - 7.44 hr back. (1)
Similar Topics

Keywords : indent, text, amount, line

  1. Problem Getting Text To Align With Different Resolutions
    (4)
  2. Using Unknown Fonts For Text In Webpage
    (5)
    Example(Click) The concept behind this article came a few days ago when I was chatting in the
    shoutbox here. I was thinking about whether we could include fonts (.ttf) on server and with the
    help of some frameworks we could display text in browser. Unfortunately, after much chatting and
    pleasing google (it just didn't show any mercy that day), I finally understood its not possible.
    I actually wanted headings (h1, h2... you get it?) in a webpage to use a nice font which I have.
    The problem is visitors won't have that font installed in thier system. The secon....
  3. Text Size Problem
    (6)
    Ok i have a skin for an ipb board that im working on, and there is just one problem left with the
    skin and that is that when you view it in Internet explore, the text comes out looking so small you
    cant read it. but it looks fine in every other browser. Any body no what might cause this and how i
    could fix it? if you need to see the css code just let me know and i will post it. Thanks....
  4. Align Text Column Without Tables Using Css
    Is it possible to get a 3 column alignment without using tables with C (13)
    I know I can use tables to get this effect but I am not sure if CSS can do it. I have not found any
    examples so far, the only alignments with CSS I have come across are whole div elements and nothing
    for inside formatting like tables offer. Heres my current stage of my layout so far. select a
    character to see output. http://sonesay.trap17.com/chars.php
    http://sonesay.trap17.com/profile.css The attached file is of my original plan but at this stage
    I cannot do a php+ajax pagination for characters because of lack of knowledge so I went with the
    simple drop down lis....
  5. Need Help On "global News" Problem.
    Change paragraph of text with CSS style change? (7)
    I am making a website for my IT Support class and a program called "Cox Connects Kids" for my
    mid-term assignment. Now I have the whole layout made and I will post a screen shot down lower. My
    basic problem/question is this: I have a right section of the page(A div) and it is supposed to be
    a global news part that shows the same on every page(I.e. home,contacts,help) and I was wondering if
    I can somehow edit my CSS file to have it in there and just change it the one time for all the
    pages. I am guessing there is some way to do this but I couldn't figure it out. I....
  6. Is It Possible To Align Text To The Center And Justify It?
    Example inside! (6)
    Basically, I have a list (like shown below) but as you can see, some parts stick out more than
    others, and it doesn't look ordered. What I wish to know is if it's possible to justify the
    text so it's ordered, but also keep it in the centre, using CSS /tongue.gif"
    style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Although if another coding
    language needs to be used, then that's ok /smile.gif" style="vertical-align:middle" emoid=":)"
    border="0" alt="smile.gif" /> Example: Beginning with A Beginning with O Beginning with V Beginn....

    1. Looking for indent, text, amount, line

Searching Video's for indent, text, amount, line
advertisement



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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE