html text align/placement help?

Discussion in 'HTML & Website Design' started by yomick, Apr 16, 2006.

  1. #1
    I had the code to do this a while back but dont know where it is?

    anyone know how to code this(I have created a sample.gif) that you see below but I am looking for the actual HTML code that allows you get the same result without the image.

    [​IMG]

    thank you
     
    yomick, Apr 16, 2006 IP
  2. D_C

    D_C Well-Known Member

    Messages:
    1,107
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    160
    #2
    As in, you want to know how to allign a image to the left of your page? I'm not sure i understand the question. If you want to allign the image to the left, the best way is:

    <img src="file" width="#" height="#" align="left" />

    I think the width and height dont need to be there, but im not sure. I put it there just because... well i know the size of my images.
     
    D_C, Apr 16, 2006 IP
  3. yomick

    yomick Active Member

    Messages:
    220
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Yeah its a little confusing... :)

    basically you have the following text

    Business & new

    NO IMAGES AT ALL

    just two words and they display as the image shows above
    there is some simple code out there that allows you to align the word "new" at the top left or right of the text ie. Business
     
    yomick, Apr 16, 2006 IP
  4. D_C

    D_C Well-Known Member

    Messages:
    1,107
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    160
    #4
    Hmmm, im not sure how to do that. I would either simply make an image of it in photoshop, Sorry i cant help you here, or do the font way, which is simple and you should know, or you can do the slighlty more complicated layer way... which if you really want to know, for me, is:
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    #Layer1 {
    	position:absolute;
    	width:52px;
    	height:23px;
    	z-index:1;
    }
    #Layer2 {
    	position:absolute;
    	width:200px;
    	height:37px;
    	z-index:2;
    	left: 63px;
    	top: 14px;
    }
    .style2 {
    	color: #FF0000;
    	font-size: 9px;
    }
    -->
    </style>
    </head>
    
    <body>
    <div id="Layer1"> Business</div>
    <div class="style2" id="Layer2">(new)</div>
    </body>
    
    Code (markup):

    But that dosent give you the result your asking for, so i wouldnt use that. And that dosent even cover the placement.

    Sorry, i cant help you here.
     
    D_C, Apr 16, 2006 IP
  5. yomick

    yomick Active Member

    Messages:
    220
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Hey I appreciate your help.

    I found it.... here it is... its a cool little html trick for formatting pages differently

    try it out - guess its called <SUP>


    Business<font face="verdana,geneva,arial,helvetica" size=1><SUP>(new)</SUP></FONT>
     
    yomick, Apr 16, 2006 IP
  6. D_C

    D_C Well-Known Member

    Messages:
    1,107
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    160
    #6
    Nifty. Thanks. Sorry, im like that whats his name guy. The one who found really complicated ways to do something simple. Thats me...
     
    D_C, Apr 16, 2006 IP
  7. yomick

    yomick Active Member

    Messages:
    220
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #7

    Ahhh... yes.... but you STILL find a way...that goes a long way...;)
     
    yomick, Apr 16, 2006 IP
  8. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi,

    The effect is called superscript, as you have already found out you can use the <sup> tag to achieve that or you can use the CSS vertical align property

    vertical-align: sup;
    Code (css):
    I recommend you do not use <font> tags and specify that instead in a stylesheet. You can always replace <font> with <span> if needed and specify the font in the style attribute, along with other properties such as vertical align.

    - P
     
    penagate, Apr 18, 2006 IP
  9. montel

    montel Banned

    Messages:
    113
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I agree with the last post much more simple
     
    montel, Apr 18, 2006 IP