Solved

text and select horizontaly aligned

Posted on 2010-09-07
8
163 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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
 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

815 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

11 Experts available now in Live!

Get 1:1 Help Now