2

Maybe this is an easy stuff for all web designers out there. So here goes. I just want to add a padding-left property to my div which is inside an div element.

This is the structure of my html

<div id="content-sub">
    <form action="/en/contact"  method="post" id="contact-mail-page">
        <div> <!-- *This part is where I want to add the property padding-left*-->
            You can leave a message using the contact form below.
            ...........
        </div>
    </form>
</div>

Points to consider:

  1. If you're suggesting of adding a class name or id name. No can't do cause I can't find/don't know the location of the contact form file so I can only add this property in the style.css.

3 Answers 3

2

Here is some CSS to add:

#contact-mail-page > div { padding-left: 10px; }

This will only apply to the first level of children in the form element, so any divs inside that div tag will not get the padding applied to it.

Sign up to request clarification or add additional context in comments.

Comments

2
#content-sub div { padding-left : 10px;}

2 Comments

Not it will with your edit! :p You had the > selector previously, which wouldn't select past the form
:-) that was a typing mistake
1

Here is you can do

#content-sub div {
//add stuff
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.