HighDots Forums  

Re: when I use DOCTYPE, margin and padding are ignored

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: when I use DOCTYPE, margin and padding are ignored in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy Dingley
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 10:19 AM






On 20 Mar, 11:51, "Edward" <edw... (AT) tanguay (DOT) info> wrote:
Quote:
Why is it when I have a DOCTYPE line in my HTML then "margin" and
"padding" are ignored?
Wrong question. Ask instead, "Why is it that when I _don't_ use a
doctype declaration, the browser tries to guess at what grossly
invalid CSS ought to mean and uses that."

Quote:
div style="margin: 20 20 20 20;
You probably meant
<div style="margin: 20px 20px 20px 20px;

Always validate your HTML and CSS before posting questions.
It will often give you an answer immediately.





Reply With Quote
  #2  
Old   
Edward
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 11:20 AM






Quote:
Always validate your HTML and CSS before posting questions.
It will often give you an answer immediately.
The above code validates fine at http://validator.w3.org which I
assumed was the end-all authority on HTML validation.

Does anyone know of a more accurate HTML validating service?




Reply With Quote
  #3  
Old   
Edward
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 11:28 AM



Quote:
You probably meant
div style="margin: 20px 20px 20px 20px;
Yes, the "px" identifiers fix it, thanks.
I'd picked up a bad habit along the way of not including them.

Edward Tanguay
All my projects: http://www.tanguay.info




Reply With Quote
  #4  
Old   
Andy Dingley
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 11:48 AM



On 20 Mar, 15:20, "Edward" <edw... (AT) tanguay (DOT) info> wrote:
Quote:
Always validate your HTML and CSS before posting questions.
It will often give you an answer immediately.

The above code validates fine athttp://validator.w3.orgwhich I
assumed was the end-all authority on HTML validation.
It's valid HTML, but it's not valid CSS. You need to check both, and
usually have to do it separately.

I stongly recommend using Firefox and the latest HTML validator
extension.
http://users.skynet.be/mgueury/mozilla/
This includes a real HTML validator and also Tidy. Because it's
pervasive and automatic, it also gets used (unlike making the effort
to use the W3C).



Reply With Quote
  #5  
Old   
Edward
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 12:39 PM



Quote:
I stongly recommend using Firefox and the latest HTML validator
extension.http://users.skynet.be/mgueury/mozilla/
This includes a real HTML validator and also Tidy. Because it's
pervasive and automatic, it also gets used (unlike making the effort
to use the W3C).
I installed that, seems to work fine, thanks.

I checked my above code at http://jigsaw.w3.org/css-validator and the
pixel errors shows up immediately, very nice.

I also found and installed this Firefox CSS validator addon (https://
addons.mozilla.org/firefox/2289) but realized that it simply goes
online to the above service and hences doesn't work for local files,
which would be nice when developing, like you say, so it is automatic
and actually gets used.

Do you know of any CSS validator addons for Firefox that check LOCAL
files?

Edward Tanguay
All my projects: http://www.tanguay.info




Reply With Quote
  #6  
Old   
Edward
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 04:51 PM



Quote:
With the Web Developer Extension you can check local CSS (via uploading
the CSS to the W3C's CSS checker). Or do you mean checking while you're
not online?
Checking local code while online is ok, I just want to be able to
check quickly as I develop.
I have the Web Developer Extension but under the CSS dropdown I only
find:

Disable Styles
Disable CSS by Media Type
View CSS
View Style Information
Add User Style Sheet
Edit CSS
User Border Box Model

Is there a selection somewhere to automatically upload the code to the
online CSS checker?

Edward Tanguay
All my projects: http://www.tanguay.info



Reply With Quote
  #7  
Old   
dorayme
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 05:53 PM



In article
<1174405688.005803.192190 (AT) e1g2000hsg (DOT) googlegroups.com>,
"Andy Dingley" <dingbat (AT) codesmiths (DOT) com> wrote:

Quote:
I stongly recommend using Firefox and the latest HTML validator
extension.
http://users.skynet.be/mgueury/mozilla/
This includes a real HTML validator and also Tidy. Because it's
pervasive and automatic, it also gets used (unlike making the effort
to use the W3C).
Thanks for mentioning this one. I will have it when I can solve
the following query:

At http://users.skynet.be/mgueury/mozilla/download.html there is
a 4 line instruction set and I am stumped by point 3. What
exactly does one need to do to "add the website to the authorized
list."? I run OS X on Tiger, PPC.

I ask here in case someone here has already done this, I have
also asked in a Mac group. You see how anxious I am to get it, it
is a good idea!

--
dorayme


Reply With Quote
  #8  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 06:10 PM



dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> writes:

Quote:
In article
1174405688.005803.192190 (AT) e1g200...oglegroups.com>,
"Andy Dingley" <dingbat (AT) codesmiths (DOT) com> wrote:

I stongly recommend using Firefox and the latest HTML validator
extension.
http://users.skynet.be/mgueury/mozilla/
This includes a real HTML validator and also Tidy. Because it's
pervasive and automatic, it also gets used (unlike making the effort
to use the W3C).

Thanks for mentioning this one. I will have it when I can solve
the following query:

At http://users.skynet.be/mgueury/mozilla/download.html there is
a 4 line instruction set and I am stumped by point 3. What
exactly does one need to do to "add the website to the authorized
list."? I run OS X on Tiger, PPC.
Bring up the FireFox preferences. In the "Security" pane, the "warn me
when sites try to install add-ons" should be checked. Click the button
to the right of that, labeled "Exceptions", and add "users.skynet.be"
to the list of sites that are, as the button's name implies, exceptions
to the normal rule and therefore allowed to install add-ons.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


Reply With Quote
  #9  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 06:24 PM



Sherm Pendley <spamtrap (AT) dot-app (DOT) org> writes:

Quote:
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> writes:

In article
1174405688.005803.192190 (AT) e1g200...oglegroups.com>,
"Andy Dingley" <dingbat (AT) codesmiths (DOT) com> wrote:

I stongly recommend using Firefox and the latest HTML validator
extension.
http://users.skynet.be/mgueury/mozilla/
This includes a real HTML validator and also Tidy. Because it's
pervasive and automatic, it also gets used (unlike making the effort
to use the W3C).

Thanks for mentioning this one. I will have it when I can solve
the following query:

At http://users.skynet.be/mgueury/mozilla/download.html there is
a 4 line instruction set and I am stumped by point 3. What
exactly does one need to do to "add the website to the authorized
list."? I run OS X on Tiger, PPC.

Bring up the FireFox preferences. In the "Security" pane, the "warn me
when sites try to install add-ons" should be checked. Click the button
to the right of that, labeled "Exceptions", and add "users.skynet.be"
to the list of sites that are, as the button's name implies, exceptions
to the normal rule and therefore allowed to install add-ons.
Oh, another way to do the same thing: When you click on one of the download
links, FF will create an alert banner at the top of the page. To the right
of the alert banner there's an "Options" button. Clicking that button will
bring up the exceptions list too, which the name of the current site already
filled in.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


Reply With Quote
  #10  
Old   
dorayme
 
Posts: n/a

Default Re: when I use DOCTYPE, margin and padding are ignored - 03-20-2007 , 06:30 PM



In article <m2y7lrd0r4.fsf (AT) local (DOT) wv-www.com>,
Sherm Pendley <spamtrap (AT) dot-app (DOT) org> wrote:

Quote:
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> writes


At http://users.skynet.be/mgueury/mozilla/download.html there is
a 4 line instruction set and I am stumped by point 3. What
exactly does one need to do to "add the website to the authorized
list."? I run OS X on Tiger, PPC.

Bring up the FireFox preferences. In the "Security" pane, the "warn me
when sites try to install add-ons" should be checked. Click the button
to the right of that, labeled "Exceptions", and add "users.skynet.be"
to the list of sites that are, as the button's name implies, exceptions
to the normal rule and therefore allowed to install add-ons.

Thanks Sherm, appreciate it.

--
dorayme


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.