473,785 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with line height when using <span> and "float:righ t"

97 New Member
Hi there,

I am building a small WebApp, and using a list to display country values for a specific variable. It should be like

Country A 10
Country B 4
Country C 125


So, what I have in CSS is this:
Expand|Select|Wrap|Line Numbers
  1. .variable {
  2.     font-size: 12px; 
  3.     font-weight: bold;
  4.     color: #7388a5;
  5. }
  6.  
  7. .value {
  8.     font-size: 12px; 
  9.     text-align: right;
  10.     float: right;
  11. }
and the code like this:
Expand|Select|Wrap|Line Numbers
  1. <ul>
  2.   <li>
  3.     <span class="variable">Afghanistan</span>
  4.     <span class="value">10</span>
  5.   </li>
  6. </ul>
But, when using a 1px border around the SPANs, I see that the "variable" box is a big as the name, but the "value" boxes are taller, as if there would be a BR attached to the SPAN.

What is this, and how can I solve this?

Thanks for any hints!
Jun 3 '10 #1
2 4533
drhowarddrfine
7,435 Recognized Expert Expert
I don't see this problem at all. Which browser are you using?
Jun 3 '10 #2
luftikus143
97 New Member
Ok, I stripped off all CSS code which was included in DIVs before, and started from scratch. Now it works again. Problem was related with parent-CSS.

Cheers!
Jun 3 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
2851
by: Sander Tekelenburg | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The HTML specs speak of "replaced" and "non-replaced" elements, yet for the life of me I can't find an explanation of what "replaced" is supposed to mean in this context. Can someone explain? TIA
3
2459
by: Adam Toline | last post by:
In reference to the following: http://www.bellecose.com/form.htm At the top of each column there is a box for "All". When one is checked I need to check all of (and only) those boxes underneath. Now, the rub here is that every checkbox on the page (except the "All"s)
15
8956
by: pbd22 | last post by:
Hi. I want to create a tab with a little "active tab" arrow below it to tell the user where they are. An example is here: http://personals.yahoo.com/us/search/dashboard Does anybody know of any examples out there on how to do this? Thanks!
3
4547
by: laredotornado | last post by:
Hi, Below I have an unordered list that is displayed on the same horizontal plane (thanks for the help yesterday). What I am wondering now is I would like the contents of the DIV with class "tabs- container" to be always displayed on the next line. Right now, it is being displayed on the same line as the unordered list. I could apply a <BRtag, I suppose, but I was hoping there is a more elegant, CSS way to move the content to the...
5
3561
eragon
by: eragon | last post by:
I wrote this function to create a new file when the user posts in my forums, and its not creating a new file, can you help me? this script is not copyrighted as the last one. function createNewFile($name,$mail,$subject,$comments,$count,$date,$other="",$up="0") { global $settings; $header=implode('',file('header.txt')); $footer=implode('',file('footer.txt')); $content=' <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">...
3
1746
by: riggy | last post by:
So, I have an order form that works fine in IE but when you enter the info in Firefox and click the Submit Button, nothing happens. I am not sure if the button is not working or if there is a error in the Javascript code. Regardless, I have one of those situations where I can look at this all day and see nothing. Please help! TIA..... When you click the submit buttn, I do a form fields error check . If there are errors, you get a alert. If no...
2
4309
by: bips2008 | last post by:
The code seems to work fine in other browser but in IE it throws this error. This is very urgent for me and any help would be greatly appreciated For your convienence i have posted the code for the file. The portion that is not working is the star rating part <?php session_start(); include_once('includes/host_conf.php'); include_once('includes/db_connect.php'); include_once('includes/mysql.lib.php');...
5
13381
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the website URL before the image URL.
0
9489
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10100
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4061
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.