472,988 Members | 3,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 software developers and data experts.

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
4 4229
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Fabian Neumann | last post by:
Hi! I got a problem with font-family inheritance. Let's say I have CSS definitions like: p { font:normal 10pt Verdana; } strong { font:normal 14pt inherit;
17
by: delerious | last post by:
I'm trying to add some simple padding to an IMG by using a padding-right style, but it doesn't work in IE. Works fine in Mozilla and Opera, though. Here's a link to a page which displays this IE...
12
by: Stanimir Stamenkov | last post by:
Here are two cases regarding inline-level elements' line-height, padding and background, which I doesn't understand: <div style="background: black; color: white; line-height: 1.5">...
12
by: Skarmander | last post by:
The standard allows an implementation where CHAR_BIT = 32 and sizeof char = sizeof short = sizeof int = sizeof long = 1, right? Just out of curiosity, does anyone know actual implementations that...
4
by: Slavyan | last post by:
(I just started to learn C#.NET) What's the syntax in c# for a class to inherit more than one class. I know following syntax: public class MyClass : MyOtherClass { } but I need to inherit...
12
by: wjb131 | last post by:
hi all, below you find my simple python version of MD2 algorithm as described in RFC1319 (http://rfc1319.x42.com/MD2). It produces correct results for strings shorter than 16 Bytes and wrong...
12
by: Eric Lindsay | last post by:
I have a web page at http://www.architectqueensland.com/index.html styled with http://www.architectqueensland.com/architect.css The site is valid HTML 4.01 Strict. The CSS is valid 2.1 except for...
11
by: simonp | last post by:
I'm taking an intro course on C++, and our teacher is not being clear on how stuct memory padding is determined. If the memory used by all components defined inside a struct falls between a...
12
by: Kislay | last post by:
case 1 : struct s { char c1; // 8 double d; // 8 int i1; // 4 char c2; // 4 int i2; // 4 };
8
by: rodeored | last post by:
page: http://reenie.org/test/blockpadding.htm code:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>test</title> </head> <body> <h2 style='padding:0; border:solid 1px...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.