• 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!

Reply to: CSS Help

Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "CSS Help"

Collapse

  • minestrone
    replied


    Thanks Nick!! Works perfectly.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by minestrone View Post
    blah blah blah
    Oh, BTW:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    
    <style type="text/css">
    
    ul {
       list-style: none;
       border: 1px solid #000;
       width: 400px;
    }
    
    ul span {
        float: left;
    }
    
    ul span.currency {
        float: right;
    }
    
    li {
        clear: both;
        overflow: hidden;
    }
    
    </style>
    
    </head>
    <body>
    <ul>
    <li><span>Blah di blah</span> <span class="currency">£3.75</span></li>
    <li><span>Foo di foo</span> <span class="currency">£23.00</span></li>
    <li><span>boogle oogle oogle</span> <span class="currency">£1234.56</span></li>
    </ul>
    </body>
    </html>
    WFM in Firefox 3.5.2, Chrome 3.0 Beta, and IE 6.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by minestrone View Post
    The designer was asked to put a list in sometime in January, he put the list in and styled accordingly, he finished the job in February and was paid in February, I have not spoken to him since then.

    A new requirement came in sometime in the summer where a monetary value was asked to be put in to the list and I do not think it is a totally ridiculous question to ask how to align a bit of text up against the right hand side of it's area's border.

    Quite why you wanted to come into this knowing bugger about the history leading up to the thread and start being an arse by questioning the ability of some one you have never met based on a piece of work you have never seen is only something you can answer. I tend not to come up with assumptions based on minor facts like yourself.

    Leave a comment:


  • minestrone
    replied
    Originally posted by NickFitz View Post
    It sounds like your designer needs to learn when to use them for the right reasons
    The designer was asked to put a list in sometime in January, he put the list in and styled accordingly, he finished the job in February and was paid in February, I have not spoken to him since then.

    A new requirement came in sometime in the summer where a monetary value was asked to be put in to the list and I do not think it is a totally ridiculous question to ask how to align a bit of text up against the right hand side of it's area's border.

    Quite why you wanted to come into this knowing bugger about the history leading up to the thread and start being an arse by questioning the ability of some one you have never met based on a piece of work you have never seen is only something you can answer. I tend not to come up with assumptions based on minor facts like yourself.

    Leave a comment:


  • NickFitz
    replied
    Tabular data goes in tables. That's what they're for.

    We've spent most of this decade teaching people not to use tables for the wrong reasons. It sounds like your designer needs to learn when to use them for the right reasons

    Leave a comment:


  • Zippy
    replied
    All wrong in FF 3.0.5

    Price is right justified but a line below where it should be.

    Leave a comment:


  • Durbs
    replied
    So to confirm:

    <style type="text/css">
    .bigFloater {
    float:right;
    }
    </style>
    <ul>
    <li style="width:100%">Fred<span class="bigFloater">£20</span></li>
    <li style="width:100%">Bob<span class="bigFloater">£40</span></li>
    </ul>

    Works in Safari and cant be arsed testing beyond that.

    Leave a comment:


  • Bunk
    replied
    Originally posted by minestrone View Post
    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
    Firstly, I think you meant to use style="text-align:right" but that won't work anyway. Quick easy way would be:

    <ul>
    <li style="width:100px">Fred<div style="float:right">£20</div></li>
    <li style="width:100px">Bob<div style="float:right">£40</div></li>
    </ul>

    Leave a comment:


  • Zippy
    replied
    Shouldn't use a div. Try a span

    Leave a comment:


  • Durbs
    replied
    Ah, i only tried Firefox, try inline-block

    Leave a comment:


  • Spacecadet
    replied
    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!

    Leave a comment:


  • Durbs
    replied
    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.

    Leave a comment:


  • Durbs
    replied
    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.

    Leave a comment:


  • Spacecadet
    replied
    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

    Leave a comment:


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

    Leave a comment:

Working...
X