473,695 Members | 2,787 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?
Jul 21 '05 #1
4 4284
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="padding3 0">
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#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 |
`-------------------------------------------------- --<--@ ------------'
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="padding3 0">
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#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.

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#propde f-padding-left> for
padding
<http://www.w3.org/TR/REC-CSS2/box.html#propde f-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
19478
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
29234
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 problem: http://home.comcast.net/~delerious1/index12.html I do know that I can solve the problem in IE by changing padding-right to margin-right, but then the links cannot be clicked when the mouse is over that margin area. So I would...
12
6727
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"> <span>Abc</span> <span style="background: white; color: black; line-height: 3">Abc</span> <span>Abc</span> </div>
12
3803
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 have this? S.
4
27443
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 one more class.
12
4519
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 results for longer strings. I can't find what's wrong. Can anybody help?
12
5151
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 use of the CSS3 text-shadow property. The side navigation on the pages displays basically as expected in Firefox, Opera and Safari. According to Browsershots, IE7 is also OK for navigation. The desired appearance is as Safari does it (same...
11
3626
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 certain gradient, a struct "rounds up" to the nearest multiple of the gradient. This teacher is somewhat erratic and has said on subsequent days that first the padding is rounded up to nearest multiple of 4, and then the nearest power of 2.
12
4795
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
2880
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 red;'>A bunch of text</h2> </body> </html>
0
8572
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8984
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8825
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7661
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6491
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5839
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2272
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.