Solved

text and select horizontaly aligned

Posted on 2010-09-07
8
161 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.
Comment Utility
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
Comment Utility
0
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
<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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:rgb192
Comment Utility


I cant use tables
I must use div
0
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
did that worked for you?
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
Comment Utility
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
Comment Utility
thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

763 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