Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Can't insert a space before a result

Participant ,
Jun 19, 2012 Jun 19, 2012

Copy link to clipboard

Copied

Hi:

I thought I was trying to do something very simple... add a space before the results {beds}.

I've tried margin-left, padding-left, &nbsp before {beds} but can't get it to move to the right a bit...

I think the PHP is messing with it, but not sure where to start.

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

Thanks in advance 🙂 Jami

TOPICS
Server side applications

Views

686
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 19, 2012 Jun 19, 2012

Copy link to clipboard

Copied

This is what it looks like currently, if this helps... I want more space btwn the field and the different kinds of beds.Screen shot 2012-06-19 at 3.19.40 PM.png

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 19, 2012 Jun 19, 2012

Copy link to clipboard

Copied

You are posting to the wrong forum. Post in the Dreamweaver forum and include your CSS.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 19, 2012 Jun 19, 2012

Copy link to clipboard

Copied

Oh sorry. I thought this was a PHP issue (Isn't that what the "{" signify?)

I needed to hunt down this code (which was hard, since I don't know much beyond basic html and css.)

I changed /"width:17px/" to /"width:13px/" and it worked. (I decided the boxes could be a bit less wide, and that resolved my other issue.

I don't know why it worked. But it did. Phew!

$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>"
;
         
}

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 20, 2012 Jun 20, 2012

Copy link to clipboard

Copied

LATEST

>Oh sorry. I thought this was a PHP issue (Isn't that what the "{" signify?)

Your html code IS contained in a php variable, but once the server is done with it the browser just see's html. So it's still a html rendering issue you are dealing with and these are better handled in the Dreamweaver forum. Glad you got it worked out though.

By the way, I would not hardcode the backslashes in your code as it makes it hard to maintain. If you need to add slashes, think about using addslashes() or a DBMS specific function if available.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines