467,903 Members | 1,863 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,903 developers. It's quick & easy.

inherit problem with padding-left

hi,
when i use the padding-left attribut, i like to overwrite a default
value like that

..padding30 {margin-left: 30px;}
..padding0 {margin-left: 0px;}

<div class="padding30">
Padding 30
<div id="padding0">
<p>Padding 0 </p>
</div>
</div>

Can i get this working?
Jul 21 '05 #1
  • viewed: 3926
Share:
4 Replies
On Wed, 11 May 2005 11:31:42 +0200, Wilhelm Kutting <wk******@arcor.de>
wrote:
when i use the padding-left attribut, i like to overwrite a default
value like that

.padding30 {margin-left: 30px;}
.padding0 {margin-left: 0px;}

Where is the padding-left attribute? All I see is margins.
<div class="padding30">
Padding 30
<div id="padding0">
<p>Padding 0 </p>
</div>
</div>

Can i get this working?


What is it you are trying to achieve? You don't do anything with the
padding of those paragraphs. You just play around with the margins.

<http://www.w3.org/TR/REC-CSS2/box.html#propdef-padding-left> for padding
<http://www.w3.org/TR/REC-CSS2/box.html#propdef-margin-left>

BTW: don't name classes after the effect you're trying to achieve. Name
them more semantically. What if the paragraph with class .padding0, needs
a padding of 3em in a future design?
Also: avoid fixed sizes and lengths where possible. If you use a relative
sizing, your design easily adjusts to visitors explicite wishes for larger
or smaller font sizes or viewport dimensions.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #2
Hello,
bad i tried aout a little bit and posted the last tryout, shame on me.
here is the right css-def.

..padding30 {padding-left: 30px;}
..padding0 {padding-left: 0px;}

What i achive is a padding of 30px on every page except 2 pages with a
padding of 0px.
I don't want to change the padding attribut to 0px on all pages, only on
the 2 special pages.

The problem is, that i can't see a chance to reset or overwrite the
padding-values.

Barbara de Zoete schrieb:
On Wed, 11 May 2005 11:31:42 +0200, Wilhelm Kutting <wk******@arcor.de>
wrote:
when i use the padding-left attribut, i like to overwrite a default
value like that

.padding30 {margin-left: 30px;}
.padding0 {margin-left: 0px;}


Where is the padding-left attribute? All I see is margins.
<div class="padding30">
Padding 30
<div id="padding0">
<p>Padding 0 </p>
</div>
</div>

Can i get this working?

What is it you are trying to achieve? You don't do anything with the
padding of those paragraphs. You just play around with the margins.

<http://www.w3.org/TR/REC-CSS2/box.html#propdef-padding-left> for padding
<http://www.w3.org/TR/REC-CSS2/box.html#propdef-margin-left>

BTW: don't name classes after the effect you're trying to achieve. Name
them more semantically. What if the paragraph with class .padding0,
needs a padding of 3em in a future design?
Also: avoid fixed sizes and lengths where possible. If you use a
relative sizing, your design easily adjusts to visitors explicite
wishes for larger or smaller font sizes or viewport dimensions.

Jul 21 '05 #3
On Wed, 11 May 2005 11:52:36 +0200, Wilhelm Kutting <wk******@arcor.de>
wrote:

[ please do not toppost. Quote the part you reply to, attribute the quote,
and then reply underneath the quote
corrected this once ]
Barbara de Zoete schrieb:
What is it you are trying to achieve? You don't do anything with the
padding of those paragraphs. You just play around with the margins.
<http://www.w3.org/TR/REC-CSS2/box.html#propdef-padding-left> for
padding
<http://www.w3.org/TR/REC-CSS2/box.html#propdef-margin-left>
.padding30 {padding-left: 30px;}
.padding0 {padding-left: 0px;}

What i achive is a padding of 30px on every page except 2 pages with a
padding of 0px.
I don't want to change the padding attribut to 0px on all pages, only on
the 2 special pages.

The problem is, that i can't see a chance to reset or overwrite the
padding-values.


Then first of all: read *both* of the documents I provided you with, with
the two URL's. One for padding and one for margin. If you don't understand
them, and the context they provide, ask a more specific question on what
you don't understand in here.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #4
Wilhelm Kutting wrote:

when i use the padding-left attribut, i like to overwrite a default
Can i get this working?


What Barbara said, plus do not post code. Post the URL of a sample page
instead. And, due to language differences, it would be a good idea to
include in that sample page a mockup of what you are trying to achieve.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Fabian Neumann | last post: by
17 posts views Thread by delerious | last post: by
12 posts views Thread by Stanimir Stamenkov | last post: by
12 posts views Thread by Skarmander | last post: by
4 posts views Thread by Slavyan | last post: by
12 posts views Thread by wjb131 | last post: by
12 posts views Thread by Eric Lindsay | last post: by
11 posts views Thread by simonp | last post: by
12 posts views Thread by Kislay | last post: by
8 posts views Thread by rodeored | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.