Is there a way to do this with HTML and CSS?

Discussion in 'HTML & Website Design' started by billybw, Mar 27, 2008.

  1. #1
    I would like to put one word of text in the extreme upper left corner of a page, and another word in the extreme upper right-hand corner, with both words on the same line, and nothing but blank space between them.

    Is there a way to do this using HTML and CSS?

    Thank you
     
    billybw, Mar 27, 2008 IP
  2. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think this should work for you, there may be a better way however.

    Click here
     
    nicangeli, Mar 27, 2008 IP
  3. billybw

    billybw Peon

    Messages:
    1,012
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks. I'm trying to make it work now, but the second word (topright) doesn't show for me. I think the problem is that I'm already using "p' for my main content with a different style definition. Also, I'm not familiar with "float". But I keep working on it, and should get it eventually.

    Thanks again
     
    billybw, Mar 27, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could apply a id to that P tag, and then apply all the styles that are on you current P to p#id.

    If that makes sense.

    Or you could use span tags and wrap them in a block level element such as a div.

    Here is that.
     
    nicangeli, Mar 27, 2008 IP
  5. billybw

    billybw Peon

    Messages:
    1,012
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I got it working now. I used "q" instead of "p", and I also had to change "49%" to "45% (to adjust for a special border that I already had).

    I'm going to get more info about that float tag -- It looks interesting.

    Thanks again. I really appreciate the time you gave up to help me.
     
    billybw, Mar 27, 2008 IP
  6. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #6
    can be done with floats or possibly with display:table-cell; I think...
     
    risoknop, Mar 27, 2008 IP