Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
  1. #1
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    How would I line up text both right and left align? heres an example of how I would like it:

    this is a sentence: this is a sentence
    this is a longer sentence: this is a longer sentence
    short sentence: short sentence
    <this is right aligned>: <this is left aligned>

    EDIT: ok this doesnt look like I want it to look but I hope you get the picture. All the colons must be directly under one another.

    I have all of the text encapsulated in a <p>aragraph. Then the other thing is I want to be able to position this text on the page. Say maybe, position the colons in the middle of the page or somewhere I specify...

    Can anyone help? Ive done this with tables.. easy. 2 cells - one right aligned, the other left aligned. But I want to do it in CSS! thanks

  2.  

  3. #2
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    use span
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  4. #3
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    I will give that a try. Would I use 2 <span class="name">. one right aligned, one left aligned?

    I have another question. If you take alook at this URL: http://www.eadsdirect.co.za/winacc/index.html

    The two orange boxes are positioned using absolute. But they display differently in IE and firefox. in IE it is about 15 px from the blue bar, but in firefox they are positioned 25px. ????

    Is there a better way to do this or what can I do for it to look the same in IE and firefox?

  5. #4
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    I tried using <span class="rightAlign"> (I made a class called .rightAligned). I wouldn't right align.
    Only using a <div class="rightAlign"> did it work....

  6. #5
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    sorry... i should've explained a bit better.

    HTML Code:
    <span style="float: left;">left</span><span style="float: right;">right</span>
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  7. #6
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Ok that sucks. When using two span tags, the text stays on the same line. I tried to use to div tags and they positioned the text correctly on an x axis, but they arent on the same line

    I need some help here! read the post about right aligning and left aligning text on the same line.

    EDIT: this post was late. ignore plz!

  8. #7
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    yes.. a span is an inline element as oppose to a div that create a line break
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  9. #8
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    cool the float thingy works. next question. how do I position the text? lets say the rightaligned text must be 50px from left margin.
    How do i do this?

  10. #9
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    you're talking about the box problem now? ... that could just be the way IE interprets 15px VS FF !!?
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  11. #10
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    dont worry karinne. I worked it all out. Thank you very much for the help with the <span> tag!


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com