View Single Post
  #2  
Old 02-20-2008, 11:14 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: change margins to 10px on home page

Hi Divine,

At present you have this in your source...
<div><span style="FONT-SIZE: 10pt; FONT-FAMILY: Bookman Old Style">Welcome to Divine Chic, specialist ...</span></div>

If you take a closer look you can see that you have an empty div tag which is helping the span tag to look like a block level element (in effect making it look like it starts a new paragraph). An inline element such as spans sometimes has troubles displaying margins.

To remedy this there are two ways...
1. use the existing spans and turn them into block level elements in the style attribute with display:block;

or

2. Get rid of all span tags for the text and place into the existing empty Div's style attribute the margin there. This might result in cleaner code.


Make sure you back up, below I have added margin:30px to both examples below so you can see the effect as sometimes 10px can be deceiving and look like it's not working.

Remedy 1 would look like (your existing code with addition of display:block )...
<div><span style="Display:block; Margin:30px;FONT-SIZE: 10pt; FONT-FAMILY: Bookman Old Style">Welcome to Divine Chic, specialist ...</span></div>

Remedy 2 would be (remove spans and cleaner code)....
<div style="margin:30px; FONT-SIZE: 10pt; FONT-FAMILY: Bookman Old Style">Welcome to Divine Chic, specialist ...</div>


Remember this is for the text divs and spans only. Do not touch anything else which doesn't have to do with your welcome text.

I do apologise if I have made things a little tricky to understand. Sometimes the WYSIWYG just messes up the code too much.

Edit: PS. It's too early in the morning I can still taste the toothpaste ;D Thinking about it again; you could get rid of the surrounding empty div tags if you were to include the display:block in the span's style attribute.

Hope this helps.
Regards,
Doms
__________________
Doms
kube v4.1.9
Reply With Quote