CSS code problem

Discussion in 'CSS' started by aviron78, Sep 23, 2007.

  1. #1
    can someone edit my code...
    the tag <sup> make me extra space ...
    html code
    
    <p class="mainText">
    
    And this is the text <span style="font: bold 12px arial; color: #000;">
    And this is the text</span> software that<br/>
    And this is the text And this is the text And this is the text. 
    And this isl<br/>
    And this is the textAnd this is the textAnd this is the text <br/>
    <span style=" font:bold 11px Arial; color: #000;line-height:5px; ">
    And this is the text. And this is the text 15
    <sup><span style=" font: 11px Arial; color: #000;line-height:5px; ">
    avi</span></sup>
    And this is the text</span><br/>
    And this is the text And this is the text.
    				
    </p><br/>
    
    Code (markup):
    css code
    
    .mainText{
    
    	position: relative;
    
    	font: normal 11px arial;
    
    	top: 85px;
    
    	left: 30px;
    
    	width: 570px;
    
    	height: auto;
    
    	color: #000000;
    
    	border: solid 0px BLACK;
    
    }
    
    Code (markup):
    the relevant page -
    http ://www.coarch.co.il/123/raw/advantage.html
     
    aviron78, Sep 23, 2007 IP
  2. YIAM

    YIAM Notable Member

    Messages:
    2,480
    Likes Received:
    240
    Best Answers:
    0
    Trophy Points:
    280
    #2
    try removing line-height:5px;
     
    YIAM, Sep 23, 2007 IP
  3. aviron78

    aviron78 Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The original code is without line-height:5px;
    anyway i remove it again and no change ... still one extra space
     
    aviron78, Sep 23, 2007 IP
  4. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #4
    To remove the space between "15" and "avi" simply put your code on a single line:

    
    And this is the text. And this is the text 15<sup><span style=" font: 11px Arial; color: #000;line-height:5px; ">avi</span></sup>
    
    Code (markup):
    NOTE: Tested only with FireFox
     
    ajsa52, Sep 23, 2007 IP
  5. aviron78

    aviron78 Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    the space is between the rows ...
    the space is not between "15" and "avi"
    anyway i did as you say, no change ... still one extra space
     
    aviron78, Sep 23, 2007 IP
  6. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #6
    I've selected all the text with the mouse and copy&paste to a text editor, but I didn't see the that extra space.
    Could you number your lines and tell us where is exactly that space located ?
     
    ajsa52, Sep 23, 2007 IP
  7. aviron78

    aviron78 Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    ok just for your knowledge i enter
    a code in the CSS that say
    
    .sup{
    
    	font: normal 12px arial;
             color: #000;
             line-height:5px;
    
    }
    Code (markup):
    and in the html
    
    <sup class="sup1">
    
    Code (markup):
     
    aviron78, Sep 23, 2007 IP
  8. aviron78

    aviron78 Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    is there other option?
    it work for mozilla but not in IE
    can someone think about alternative code?
     
    aviron78, Sep 23, 2007 IP
  9. aviron78

    aviron78 Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    this solution is better in my opinion:

    sup { vertical-align: baseline; font-size: 0.6em; position:relative; top: -0.6em;  }
    Code (markup):
    just put it in the <sup> tag and in the CSS file
     
    aviron78, Sep 23, 2007 IP
  10. Crimsonc

    Crimsonc Peon

    Messages:
    616
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #10
    For starters that isn't very clear..what the hell are you actually asking for? If you want the span inside that tag to have "extra space" which I'm assuming means bigger gap between previous sentence then do this

    #sup span {height: 000px;} OBVIOUSLY changing 000.
     
    Crimsonc, Sep 24, 2007 IP