• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

CSS Help

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    CSS Help

    I have a list and I want to alight part of that list to the right hand side. So the money I want to justify up to the right border of the space...

    This is what I had..

    <ul>
    <li>Fred £20</li>
    <li>Bob £40</li>
    </ul>

    So I tried..

    <ul>
    <li>Fred <span class="text-align:right" > £20</span></li>
    <li>Bob <span class="text-align:right" > £40</span></li>
    </ul>

    But that does not work, anyone know what I am doing wrong?

    Thanks

    #2
    You're actually trying to display tabular data so why not use a table?
    Coffee's for closers

    Comment


      #3
      Originally posted by Spacecadet View Post
      You're actually trying to display tabular data so why not use a table?
      Becasue I can't be arsed changing all the nice looking CSS the designer set up for lists to tables. Esp. when its such a minor thing.

      Comment


        #4
        Originally posted by minestrone View Post
        Becasue I can't be arsed changing all the nice looking CSS the designer set up for lists to tables. Esp. when its such a minor thing.
        Best of luck with it then!
        Coffee's for closers

        Comment


          #5
          What Spacecadet Said! It is tabular data.

          Have you tried defining a bigger width for the list?
          +50 Xeno Geek Points
          Come back Toolpusher, scotspine, Voodooflux. Pogle
          As for the rest of you - DILLIGAF

          Purveyor of fine quality smut since 2005

          CUK Olympic University Challenge Champions 2010/2012

          Comment


            #6
            On my Mac so cant test any HTML but you could try a div floated right with display:inline?

            Comment


              #7
              Originally posted by Durbs View Post
              On my Mac so cant test any HTML but you could try a div floated right with display:inline?
              Stupid question, but how do macs display web pages then????

              In fact how are you reading this?
              or is there another web technology that macs use and I don't know about
              Coffee's for closers

              Comment


                #8
                Originally posted by Spacecadet View Post
                Stupid question, but how do macs display web pages then????
                What i meant was my Mac here is used for intrawebs and email and doesnt have any form of web development stuff on it and i wouldn't have a clue where the equivalent of Notepad is. I used TextEdit (after Googling for where the feck Notepad was) and:

                <ul>
                <li>Fred <div style="float:right;display:inline">£20</div></li>
                <li>Bob £40</li>
                </ul>

                Seems to work.

                Comment


                  #9
                  Plus if anyone is wondering how the hell to save a file as .htm from TextEdit when it categorically refuses to do so, you need to go Format --> Make Plain Text.

                  Thats probably why i use Windows to make intraweb pages.

                  Comment


                    #10
                    doesn't for me! (ie8)

                    I wrapped a div round it

                    PHP Code:
                    <div style="width:300px">
                    <
                    ul>
                    <
                    li>Fred <div style="float:right;display:inline">£20</div></li>
                    <
                    li>Bob £40</li>
                    </
                    ul>
                    </
                    div
                    I get this:

                    PHP Code:
                    Fred 
                    Bob £40       £20 


                    EDIT : Works in firefox though!
                    Coffee's for closers

                    Comment

                    Working...
                    X