CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 1st, 2003, 12:04 AM
iso iso is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2003
Posts: 506 iso User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 10 h 14 m 25 sec
Reputation Power: 5
aligning checkboxes with css

I cannot seem to get this to work. I have placed the checkboxes in div and span tags with no success.

I need to be able to create a series of rows (not an actual <table>) each with checkboxes and other data.

Using tables kinda works but causes a lot more problems than it fixes.

Here is some html, if you swap the pic file name for something on your computer you will see that the checkbox is ALWAYS at the bottom. I have tried everything to bring it to the middle of the row (vert), but could figure out anything.

Thanks for any help you can offer.

<html>
<head>
<style type="text/css">
<!--
.Box {
background-color: #369;
}

.text {
font-size: 14px;
color: #FFF;
}

img {
width: 150px;
padding: 0;
margin: 0;
}
-->
</style>
</head>

<body>
<div class="box">
<input type="checkbox">
<img src="SomePic">
<span class="text">etetettet ssadasdasdas asd adas da asdasd a sdasd</span>
</div>
</body>
</html>

Reply With Quote
  #2  
Old November 1st, 2003, 12:12 AM
iso iso is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2003
Posts: 506 iso User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 10 h 14 m 25 sec
Reputation Power: 5
i wasn't very clear.
I need the checkboxes in the center. Aligning them at the top is do-able, but the middle doesn't seem to want to work

Reply With Quote
  #3  
Old November 1st, 2003, 12:19 AM
iso iso is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2003
Posts: 506 iso User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 10 h 14 m 25 sec
Reputation Power: 5
I should also mention that I have tried vertical-align: middle;
but it doesn't work

Reply With Quote
  #4  
Old November 1st, 2003, 12:34 AM
scopevale scopevale is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: London, UK
Posts: 45 scopevale User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 5 m 28 sec
Reputation Power: 7
If you want the checkbox halfway up the image???

this seems to work OK (adust margin-top to fit your image size)


Code:
<html>
  <head>
    <style type="text/css">
      <!--
      .Box {
      background-color: #369;
      }


      input.check {
      float: left;
      margin-top: 90px;
      }


      .text {
      font-size: 14px;
      color: #FFF;
      }


      img {
      width: 150px;
      padding: 0;
      margin: 0;
      }
      -->
    </style>
  </head>

  <body>
    <div class="box">
     <input class="check" type="checkbox">
	<img src="imageSrc">
	  <span class="text">etetettet ssadasdasdas asd adas da asdasd a sdasd</span>
    </div>
  </body>
</html>
__________________
Gary

Last edited by scopevale : November 1st, 2003 at 12:38 AM.

Reply With Quote
  #5  
Old November 1st, 2003, 12:43 AM
iso iso is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2003
Posts: 506 iso User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 10 h 14 m 25 sec
Reputation Power: 5
I think that might be the way that I have to do it, but there is no guarantee that the height of the pic will always be the same. I adjust the width of the pic to allow nice row flow, but unless I want to distort the pictures scale I don't adjust the height as well, but there may not be too much of an offset

Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > aligning checkboxes with css


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway