Jump to content

Trying to add a space...


lessismore

Recommended Posts

Hi:I'm just trying to add a space but the things I tried didn't work...I tried typing a space and tried adding   before {beds}. I'm sure this is simple... Thanks in advance! Jami

<div class="group">    <div class="label"><label>Beds:</label></div>    <div class="field" style="width:435px; margin-top:-3px;">{beds}</div>   </div>

Link to comment
Share on other sites

Guest So Called

Are you sure you're using big enough numbers? 3px isn't much space. When I don't know WTH I'm doing I usually use bigger numbers to make it obvious when it works, like maybe 20px or 30px in this case. If it works you can adjust the numbers to a pleasing appearance. I'll admit I don't do CSS a whole bunch better than you do. But when I find something that works it works everywhere and I stick with it.

Link to comment
Share on other sites

Guest So Called

Maybe I don't understand what you're trying to do. Actually I cheated. I looked it up on the Internet. :) I'm almost sure the code I gave you will do that I think you want to do. Have a look at this page, scroll down to the padding-left example: http://www.pageresou...tml/csstut6.htm While you're at it, read the whole page.

Edited by So Called
Link to comment
Share on other sites

Yeah... I do use padding and margins all the time. And know how they work. But for some reason, it is not "seeing" it. I'm thinking it has something to do with {beds} being a PHP result, not just normal text. Maybe someone well-versed in PHP will chime in...

Link to comment
Share on other sites

Guest So Called

Something tells me you have a cache problem. (Maybe a cash problem too, don't we all?) :) Clear your browser cache. Or try ctrl-F5. Or both. I forgot, I often get bit by the browser cache when I'm tweaking code.

Link to comment
Share on other sites

Guest So Called

The code you posted in your OP does not match with the image you posted. As such I cannot compare the image to the code. And honestly I'm not an expert in this, although I appear to be the only help you have today, and I'm sitting here bored, watching my sick dog. Fun day...

Link to comment
Share on other sites

Yes, it was only part of the code... I realized it wouldn't work in that section of the code, since I tried everything I knew. I was able to locate the PHP code, which was NOT easy. Then changed the width of the box from 17 to 13px. Jeesh. Way beyond my skill level. But it worked.

$bString = "";	  $b = $this->getBeds(array("byRef" => true));	  foreach($b as $bed){	   $bString .= "		  <div style=\"float:left;\">		   <div style=\"float:left; width:35px;\">		    <input type=\"text\" style=\"width:13px;\" name=\"bed-".$bed['id']."\" id=\"bed-".$bed['id']."\" value=\"".intval(@$beds[$bed['id']])."\" />		   </div>		   <div style=\"float:left; width:175px; padding-top:10px;\">		    ".urldecode($bed['bed_name'])."		   </div>		  </div>";	  }

Thanks for trying to help. Hope your dog gets better soon!

Link to comment
Share on other sites

Guest So Called

Okay not sure if you fixed it or not. You said "it worked." You better confirm whether or not you still have a problem. Now that I've seen your code I think what you want is margin-left:3px instead of float:left. But you already tried that. I guess it's above my pay scale too. It looks like my pay scale today is watching sick dogs. I still think you could have a cache problem. In any case somebody who is better than I at CSS will probably stumble by sooner or later and sort you out. :)

Link to comment
Share on other sites

Guest So Called

By the way, maybe one of you CSS experts can confirm my understanding of what we've been playing with here. In this case it's a <DIV> I understand that padding-left will add space inside the DIV to the left of the contents, and that margin-left will add space outside the <DIV> between it and whatever precedes it. Please don't laugh at me if I've got it wrong.

Link to comment
Share on other sites

Guest So Called

Okay thanks. Then I don't know why the OP's problem wasn't resolved. I would think that either one would have given him his space. Maybe it's a cache issue...

Link to comment
Share on other sites

  • 2 weeks later...

I think I agree with you So Called... If I could see all the code I think I could understand it better for this guy. I am pretty good with css and screwing around with it. All your solutions should work, and I don't know exactly what he did in PHP to 'fix' it. I am not so PHP friendly yet either. To Lessismore If your willing to put up your code either in a file or by using the code button here I could try and sort through to find whats conflicting. I just want code I can throw open and test myself.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...