UK Webmaster Talk - Online Marketing - SEO


 

Help with css please

This is a discussion on Help with css please within the Website Design Forum forums, part of the Website Design & Development category; I have been learning css thonly thing i have a problem is if i say put a margin- left 50px ...


Go Back   UK Webmaster Talk - Online Marketing - SEO > Website Design & Development > Website Design Forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Reply

 

LinkBack Thread Tools Display Modes
Old 27-07-2006, 12:06   #1 (permalink)
Newbie
 
Join Date: Oct 2005
Posts: 2
iTrader: 0 / 0%
afcbob is an unknown quantity at this point
Default Help with css please

I have been learning css thonly thing i have a problem is if i say put a margin- left 50px everything after it will be the same or less i tell it other, i thought it would just go back to hard left.

here is the code i was playing with:
Code:
body {
background-image: url('images/Picture036.jpg')
}

span.highlight
{
background-color: yellow;
color: blue
}

p.center
{
text-align: center;
}



p.big
{
font-family: arial;
color: white;
font-size: 15pt;
}

p.dotted
{
font-size: small;
border-style: dotted;
border-style: inset;
}

p
{
font-family: sans-serif;
font-size: 36pt;
margin-left: 50px;
color: blue;
}

if you see the <p> has a margin 50px but so does the rest if i don't add something else in to correct it.is this just how it is or is there something wrong with my code.
afcbob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27-07-2006, 19:37   #2 (permalink)
Super Moderator
 
Join Date: Mar 2005
Location: Herts, UK
Posts: 1,028
iTrader: 1 / 100%
monaghan is a jewel in the rough
Default

You're defining ALL paragraphs to have a left margin of 50px.

If you need only some to have a margin, then I'd define a new class of lm50 with your margin and then use
Code:
<p class="lm50">text... </p>
to invoke the margin on the desired paragraphs.

If you're doign it for layout, then you may want to wrap the desired items with
Code:
<div class="lm50">
<p>text</p>
<p>text 2</p>
</div>
monaghan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
css

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 23:26.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
UK Webmaster Forum © WebmasterTalk.co.uk | Design by Forbairt

Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41