473,420 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,420 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 4257
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.