The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Will p respond to margin?
Mhatfield
post Jul 22 2015, 04:01 AM
Post #1


Novice
**

Group: Members
Posts: 29
Joined: 22-July 15
Member No.: 23,063



It worked as you said it would, but I want some margin between 'Status' and the photo.

Here

I tried using margin-left: 10px;

it availeth none.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jul 22 2015, 04:07 AM
Post #2


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



That's because an image is an inline element, while a P is a block-level element. Inspect both elements, you'll see how they render.

You could add a margin-right to the image instead.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Mhatfield
post Jul 22 2015, 04:09 AM
Post #3


Novice
**

Group: Members
Posts: 29
Joined: 22-July 15
Member No.: 23,063



i suspected it was something among those lines…lol

All this block level, inline, stuff = confusing lol
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Mhatfield
post Jul 22 2015, 04:10 AM
Post #4


Novice
**

Group: Members
Posts: 29
Joined: 22-July 15
Member No.: 23,063



Ok thanks it worked! wink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 22 2015, 04:19 AM
Post #5


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

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



Actually it is because the image is floated. Floats push the content of adjacent boxes away, but not the box itself. The P stretches behind the floated image all the way to the left edge of the page. For a left margin to have a visible effect it must be wider than the image.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Mhatfield
post Jul 23 2015, 01:57 AM
Post #6


Novice
**

Group: Members
Posts: 29
Joined: 22-July 15
Member No.: 23,063



Ok thanks so much! Learn something everyday wink.gif

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 23 2015, 04:02 AM
Post #7


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

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



Ha ha! Now I'm banned from your site! Or blacklisted anyway. biggrin.gif

Anyhow, put something like this on the P and you can see how it works, how the P streches and that if that you add a small left margin it only affects how far to the left the P box stretches.

CODE
<p style="border: 10px solid red; margin-top: -5px"><u><b>Status:</b></u>Currently working on my website (this site). Playing basketball and working with my horses. </p>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

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: 24th April 2024 - 12:14 PM