The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Margin?
RockHudson
post Dec 5 2020, 06:41 AM
Post #1





Group: Members
Posts: 4
Joined: 20-July 15
Member No.: 23,033



Can some one help? I am not very conversant with CSS and I want to fix a problem I have and I can't find the answer.
I am writing code for the website that I have created and despite changing several margin parameters in the stylesheet it will not give me a margin on the left hand side.(see image)
Here is the code for the content where the text is placed:
CODE

<div class="content">
        <h1>Welcome 'Lets IoT with Arduino' Website</h1>
        <p><strong>This website has been created for enthusiasts who love making gadgets with this flexible microprocessor board.  </strong>.</p>
        <p>It is our intention to make this site a focus for Arduino users and make available links and pages of useful information for <strong>Arduino enthusiasts.</strong> </p>
        <p>We have become passionate about IoT and have used many IoT modules to automate our home.  Using WiFi gadgets we can even talk to our gadgets with Amazon Alexa, Google Nest and the like.</p>
        <p>My aim for this website is to put all in one place links to useful sites as well as notes and articles concerning the vast
        array of components available to construct useful gadgets which make life much easier in our home.</p>
        <p>Although this site is based around the use of the Arduino microprocessor, some of the items mentioned in this site will work without the Arduino, but can become controlled by the Arduino as a means of control.</p>
        
      </div>

I have attached a copy of the CSS stylesheet.
Please help?


Attached thumbnail(s)
Attached Image

Attached File(s)
Attached File  style.css ( 10.1k ) Number of downloads: 170
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
RockHudson
post Dec 11 2020, 05:32 AM
Post #2





Group: Members
Posts: 4
Joined: 20-July 15
Member No.: 23,033



Hi Pandy
Yes it did, but only the <p> text and not the heading which is <h1>.
Why is this?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 11 2020, 01:45 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,732
Joined: 9-August 06
Member No.: 6



You have extra margin and padding on the Ps. Not on the H1. I thought you wanted it like that.

If you want everything to have the same left margin/padding, I'd remove that from the Ps and use everything with .content instead. You then need to make the margin on .content a little larger.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 04:31 AM