CSS problem

I have the below code - I am trying to style the labels contained ONLY in the div ID from the code below, but cannot get the style to take

I am trying
#form-container label { display: block;padding-left:300px;}
#form-container form label { display: block;padding-left:300px;}

but nothing is working. Any  ideas?

<div id ="form-container">
<div style="width:400px;height:auto;padding-left:30px;float:left;">
  <form id="ValidationShellForwardForm" method="post" action="/forward" accept-charset="utf-8">
    <div style="display:none;">
      <input type="hidden" name="_method" value="POST" />
      <input type="hidden" name="data[_Token][key]" value="" id="Token1163062533" />
    </div>
    <fieldset class="top">
      <div class="input text required">
        <label for="PersonEmail">Your Address</label>
        <input name="data[Person][email]" type="text" maxlength="64" id="PersonEmail" />
      </div>
      <div class="input text required">
        <label for="PersonFullName">Your Name </label>
        <input name="data[Person][full_name]" type="text" id="PersonFullName" />
      </div>
    </fieldset>
    <div class="input checkbox">
      <input type="hidden" name="data[PersonContactPrefSubscription][is_subscribed_to_newsletter]" id="PersonContactPrefSubscriptionIsSubscribedToNewsletter_" value="0" />
      <input type="checkbox" name="data[PersonContactPrefSubscription][is_subscribed_to_newsletter]" value="1" id="PersonContactPrefSubscriptionIsSubscribedToNewsletter" />
    </div>
    <div class="submit">
      <input type="image" src="/hp_events/img/ftaf/submit-button.jpg" />
    </div>
    <div style="display:none;">
      <input type="hidden" name="data[_Token][fields]" value="c0f75432d96b04d0b5b62d7efcb6ef34cb20ae08%3An%3A0%3A%7B%7D" id="TokenFields1188492735" />
    </div>
  </form>
</div>

Open in new window

lvollmerAsked:
Who is Participating?
 
lvollmerConnect With a Mentor Author Commented:
Like so? this did not work either. rendered the same output
#form-container form#ValidationShellForwardForm>label {display:block;padding-left:300px;}

Open in new window

0
 
LZ1Commented:
In your code, your missing a closing div tag at the bottom. Not sure if this is the full page or just a snippet.  

Also, you may wish to target more directly.
 
#form-container form#ValidationShellForwardForm label { display: block;padding-left:300px;}

Open in new window

0
 
lvollmerAuthor Commented:
that is just a snippet, let me give this a whirl
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
lvollmerAuthor Commented:
that kind of worked. it didn't style anything under the heading : free shipping, everything above that was styled appropriately however

<div id ="form-container">
          <div style="width:400px;height:auto;padding-left:30px;float:left;">
            <h3 style ="margin:0">Your Info</h3>
            <form id="ValidationShellForwardForm" method="post" action="/shutterflyfriends/forward" accept-charset="utf-8">
              <div style="display:none;">
                <input type="hidden" name="_method" value="POST" />
                <input type="hidden" name="data[_Token][key]" value="984a12c077016ed641483fa9a8f4c1a3031ab4dc" id="Token1104994818" />
              </div>
              <fieldset class="top">
                <div class="input text required">
                  <label for="PersonEmail">Your Email Address</label>
                  <input name="data[Person][email]" type="text" maxlength="64" id="PersonEmail" />
                </div>
                <div class="input text required">
                  <label for="PersonFullName">Your Name </label>
                  <input name="data[Person][full_name]" type="text" id="PersonFullName" />
                </div>
                <h3 style = "margin:0"> free shipping
                  <label for="ValidationShellFriends0">Friend #1</label>
                  <input name="data[ValidationShell][friends][0]" type="text" id="ValidationShellFriends0" />
                </h3>
                <div class="input text">
                  <label for="ValidationShellFriends1">Friend #2</label>
                  <input name="data[ValidationShell][friends][1]" type="text" id="ValidationShellFriends1" />
                </div>
                <div class="input text">
                  <label for="ValidationShellFriends2">Friend #3</label>
                  <input name="data[ValidationShell][friends][2]" type="text" id="ValidationShellFriends2" />
                </div>
                <div class="input text">
                  <label for="ValidationShellFriends3">Friend #4</label>
                  <input name="data[ValidationShell][friends][3]" type="text" id="ValidationShellFriends3" />
                </div>
                <div class="input text">
                  <label for="ValidationShellFriends4">Friend #5</label>
                  <input name="data[ValidationShell][friends][4]" type="text" id="ValidationShellFriends4" />
                </div>
              </fieldset>
              <div class="input checkbox">
                <input type="hidden" name="data[PersonContactPrefSubscription][is_subscribed_to_newsletter]" id="PersonContactPrefSubscriptionIsSubscribedToNewsletter_" value="0" />
                <input type="checkbox" name="data[PersonContactPrefSubscription][is_subscribed_to_newsletter]" value="1" id="PersonContactPrefSubscriptionIsSubscribedToNewsletter" />
                &nbsp; Please send me occasional emails about House Party, Inc., including early notice about other free events that I can apply to host!</div>
              <div class="submit">
                <input type="image" src="/hp_events/img/ftaf/submit-button.jpg" />
              </div>
              <div style="display:none;">
                <input type="hidden" name="data[_Token][fields]" value="c0f75432d96b04d0b5b62d7efcb6ef34cb20ae08%3An%3A0%3A%7B%7D" id="TokenFields547344472" />
              </div>
            </form>
          </div>
          </div>
        </div>

Open in new window

0
 
LZ1Connect With a Mentor Commented:
Ok, let's try this:

#form-container form#ValidationShellForwardForm>label

Open in new window

0
 
LZ1Commented:
Do you have a live URL you can share? There has to be something else going on that we're not seeing
0
 
lvollmerAuthor Commented:
I don't, it's a testing site.
0
 
LZ1Commented:
Everything I'm using is working fine. All of my suggestions I posted above work as well. I'm honestly not sure what else we can do unless we see a live URL of the issue.
0
 
lvollmerAuthor Commented:
it works standalone, so I will figure out the conflict. thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.