Solved

text and select horizontaly aligned

Posted on 2010-09-07
8
162 Views
Last Modified: 2012-05-10
want the text before the select area to begin at the same place
want the select box to begin at the same place

text1          select1
text200      select200
text20001   select20001
<style>

.selectstyle1{

  margin-left:0px;

  font-size:10pt;

  width:200px;

}

.divstyle1{

  margin-left: -10px;

  margin-bottom: 25px;

  font-size: 10pt;

}

</style>



<div class="divstyle1">Condition of Product:

<select class="selectstyle1">

</select>

</div>



<div class="divstyle1">Condition of Product2:

<select class="selectstyle1">

</select>

</div>



<div class="divstyle1">Condition of Product3:

<select class="selectstyle1">

</select>

</div>

Open in new window

0
Comment
Question by:rgb192
8 Comments
 
LVL 13

Expert Comment

by:George K.
ID: 33620496
use the following accordingly


<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>

0
 
LVL 7

Expert Comment

by:inxil
ID: 33620518
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 33623881
<style>
   .span1{
     width:50px;
     max-width:50px !important;
     min-width:50px !important;
   }
   .span1{
     width:60px;
     max-width:60px !important;
     min-width:60px !important;
   }
</style>

<ul>
  <li>
     <span class="span1">Row1text1</span>
     <span class="span2">Row1text2</span>
  </li>
  <li>
     <span class="span1">Row11text1</span>
     <span class="span2">Row11text2</span>
  </li>
  <li>
     <span class="span1">Row111text1</span>
     <span class="span2">Row111text2</span>
  </li>
</ul>
0
 

Author Comment

by:rgb192
ID: 33628484
I edited answer from gurvinder372


and got
Row1text1 select1text2
Row11text1 select11text2
Row111text1 select111text2
<style>
   .span1{
     width:50px;
     max-width:50px !important; 
     min-width:50px !important; 
   }
   .span2{
     width:60px;
     max-width:60px !important; 
     min-width:60px !important; 
   }
</style>

<ul>
  <li>
     <span class="span1">Row1text1</span>
     <span class="span2">select1text2</span>
  </li>
  <li>
     <span class="span1">Row11text1</span>
     <span class="span2">select11text2</span>
  </li>
  <li>
     <span class="span1">Row111text1</span>
     <span class="span2">select111text2</span>
  </li>
</ul>

Open in new window

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:rgb192
ID: 33628501


I cant use tables
I must use div
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 33628609
did that worked for you?
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 33628648
this worked for me in ff
<style>
   .div1{
     width:150px;
	 float:left;
   }
   .div2{
     width:160px;
	 float:left;
   }
</style>

<ul>
  <li>
     <div class="div1">Row1text1</div>
     <div class="div2">select1text2</div>
  </li>
  <li>
     <div class="div1">Row11text1</div>
     <div class="div2">select11text2</div>
  </li>
  <li>
     <div class="div1">Row111text1</div>
     <div class="div2">select111text2</div>
  </li>
</ul>

Open in new window

0
 

Author Closing Comment

by:rgb192
ID: 33629256
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now