inherit problem with padding-left

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wilhelm Kutting

    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="padding3 0">
    Padding 30
    <div id="padding0">
    <p>Padding 0 </p>
    </div>
    </div>

    Can i get this working?
  • Barbara de Zoete

    #2
    Re: inherit problem with padding-left

    On Wed, 11 May 2005 11:31:42 +0200, Wilhelm Kutting <wkutting@arcor .de>
    wrote:
    [color=blue]
    > when i use the padding-left attribut, i like to overwrite a default
    > value like that
    >
    > .padding30 {margin-left: 30px;}
    > .padding0 {margin-left: 0px;}
    >[/color]

    Where is the padding-left attribute? All I see is margins.
    [color=blue]
    > <div class="padding3 0">
    > Padding 30
    > <div id="padding0">
    > <p>Padding 0 </p>
    > </div>
    > </div>
    >
    > Can i get this working?[/color]

    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#propde f-padding-left> for padding
    <http://www.w3.org/TR/REC-CSS2/box.html#propde f-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 |
    `-------------------------------------------------- --<--@ ------------'

    Comment

    • Wilhelm Kutting

      #3
      Re: inherit problem with padding-left

      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:[color=blue]
      > On Wed, 11 May 2005 11:31:42 +0200, Wilhelm Kutting <wkutting@arcor .de>
      > wrote:
      >[color=green]
      >> when i use the padding-left attribut, i like to overwrite a default
      >> value like that
      >>
      >> .padding30 {margin-left: 30px;}
      >> .padding0 {margin-left: 0px;}
      >>[/color]
      >
      > Where is the padding-left attribute? All I see is margins.
      >[color=green]
      >> <div class="padding3 0">
      >> Padding 30
      >> <div id="padding0">
      >> <p>Padding 0 </p>
      >> </div>
      >> </div>
      >>
      >> Can i get this working?[/color]
      >
      >
      > 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#propde f-padding-left> for padding
      > <http://www.w3.org/TR/REC-CSS2/box.html#propde f-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.
      >[/color]

      Comment

      • Barbara de Zoete

        #4
        Re: inherit problem with padding-left

        On Wed, 11 May 2005 11:52:36 +0200, Wilhelm Kutting <wkutting@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 ]
        [color=blue]
        > Barbara de Zoete schrieb:
        >[color=green]
        >> 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#propde f-padding-left> for
        >> padding
        >> <http://www.w3.org/TR/REC-CSS2/box.html#propde f-margin-left>[/color][/color]
        [color=blue]
        > .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.
        >[/color]

        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 |
        `-------------------------------------------------- --<--@ ------------'

        Comment

        • kchayka

          #5
          Re: inherit problem with padding-left

          Wilhelm Kutting wrote:[color=blue]
          >
          > when i use the padding-left attribut, i like to overwrite a default
          > Can i get this working?[/color]

          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.

          Comment

          Working...