Problem with margins

  • Thread starter Luigi Donatello Asero
  • Start date
L

Luigi Donatello Asero

dorayme said:
Businesses have resale value. Ask yourself this question: who
will buy your business if they see your html and css? They will
never be able to work it all out or maintain it.


But is not my intention to sell the website.
 
B

Beauregard T. Shagnasty

I still can't.

What difference does that make? Probably 24.169.153.44
So, did you mean that I should write the long lines, like that, instead?
#arredamento-articoli-da-regalo.subsubsection a
{ background-color: #cccccc;
background-image:none;
color:#000000;
display: block;
text-align:center;}

Yes, only more carefully formatted.

#arredamento-articoli-da-regalo.subsubsection a {
background-color: #cccccc;
background-image:none; <--- defaults can be eliminated
color:#000000;
display: block;
text-align:center;
}

Notice the braces are on the first and last line (not mixed with the
attributes), and each one is indented the same amount. I prefer three
spaces, or one tab. (You see, I am a retired programmer.)

You also use very long names for your classes and ids. Surely the words
can be condensed.
 
D

dorayme

"Luigi Donatello Asero said:
So, did you mean that I should write the long lines, like that, instead?
#arredamento-articoli-da-regalo.subsubsection a
{ background-color: #cccccc;
background-image:none;
color:#000000;
display: block;
text-align:center;}

That is the sort of thing I think...
 
D

dorayme

"Beauregard T. Shagnasty said:
#arredamento-articoli-da-regalo.subsubsection a {
background-color: #cccccc;
background-image:none; <--- defaults can be eliminated
color:#000000;
display: block;
text-align:center;
}

and

background-color: #cccccc; <-- can be condensed to color:#ccc;
color:#000000; <-- can be condensed to color:#000;
 
D

dorayme

dorayme said:
and

background-color: #cccccc; <-- can be condensed to color:#ccc;
color:#000000; <-- can be condensed to color:#000;

Sorry, I mean

"background-color: #cccccc;" can be condensed to
"background-color:#ccc;"

and while in this minimalist mood, you may be able to just use
the short form "background"...
 
L

Luigi Donatello Asero

dorayme said:
You mean you would sell the business but keep the website?

Hello,
I only have a one-man business......
who should be interested?



How does the style-sheet look now?
I get a parse error.


p{
margin-left:auto;
margin-right:auto;
margin-bottom:2%;
margin-top:2%;
padding:1%;
text-indent:4%;
}

body{
width:100%;
margin-left:2%;
margin-right:5%;
margin-top:auto;
margin-bottom:auto;
}


span.aggiornamento
{
border:1px solid black;
background: green;
padding:0.5%;
margin:1em;
color:#ffffff;
width:auto;
text-align: center;
border-spacing: 1em;
}


TABLE{
border: 1px solid black;
width:auto;
background:#ffffff;
color:#000000;
border-spacing: 1px;
}


..sovrum-med-dubbelsang-2 {
color:#000000; border: 1px solid black;
background: #ffffff;
margin-left:auto; clear:right; width:auto;}
..sovrum-med-dubbelsang-1 {color:#000000; border: 1px solid black;
background: #ffffff;
width:100%;
}
..genomgaangsrum {
color:#000000; border: 1px solid black;
background: #99ff66;
}
..garderob {
color:#000000; border: 1px solid black;
background: #ffffff;
}
..bdarum-1 {
color:#000000; border: 1px solid black;
background: #ffffff;
}
..badrum-2 {
color:#000000; border: 1px solid black;
background: #ffffff;
}


..four a {
color: #ffffff; background-color:#cc6600;
}


th, td {
color: black;
background:#ffffff;
text-align:center;
width:auto;
border: 1px solid black;
}

h1, h2, h3, h4, h5 {
text-align:center;
}








#five a{
color:white;
background: #cc6600;
}




body {
font-family: sans-serif;
background: #ffffff;
color: black;
font-size: 100%;
margin: 1%;
}
#head.subsection{
border:0px solid white;
margin-top:6%; margin-bottom:2%;
font-size:smaller;
}

#innehaall{
margin-top: 5%;
margin-left:5%;
border:1px solid white;}
DIV.normal{margin-top: 5%;
margin-left:5%;
}

#menu a {
margin:auto;
color:#0000cc;
background:#ffcc00;
text-align:center;
border-left:1px solid #F66460 ;
border-top:1px solid #F66460 ;
border-right:1px solid #000000 ;
border-bottom:1px solid #000000 ;
width: 100%;
display: block;
}

#menu a:active {
color: #0000cc; background-color:#ffffff;
}
#menu a:hover {
color: #666666;
background-color:#ffffff;
border-left: 1px solid #000000;
border-top: 1px solid #000000;
border-right: 1px solid #F66460;
border-bottom: 1px solid #F66460;
}


#svezia.subsubsection{
margin-top:auto;
margin-bottom:auto;
margin-left:5%;
margin-right:auto;
width:auto;
}

#annunci-immagini.subsection
{
margin-top:2%;
margin-bottom:50%;
width: 30%;
float: right;
}

#foto-svezia-meridionale.subsubsection
{
float:left;
width: 25%;
min-width: 200px;
min-height: 200px;
border: thin silver solid;
margin-top:0.5em;
margin-left:0.5em;
margin-right:1em;
margin-bottom:0.5em;
}
#foto-svezia-meridionale.subsubsection p
{
text-align: center;
font-style: italic;
font-size: smaller;
text-indent: 0;
}
#note-pagina.subsection
{
margin-top:8%;
margin-bottom:2%;
margin-left:auto;
margin-right:auto;
width:100%;
}

#flora-fauna-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}

#lingue-in-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}

#diversi-strumenti.subsection
{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#introduzione.subsection{
margin-top:2%;
margin-bottom:2%;
width:auto;
}
#costituzione-svedese.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#coronasvedese-euro.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#democrazia-rappresentanza-politica-emancipazione.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#sport-in-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#feste-in-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#premio-nobel-a-stoccolma.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#settore-energetico-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#nomi-cognomi-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#stato-civile-popolazione-in-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;}
#territorio-e-densita-popolazione-in-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#mediazione-affitti.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#turisti-italiani-in-svezia.subsubsubsection{
margin-top:8%;
margin-bottom:2%;
width:auto;
}
#posizione-geografica.subsubsubsection{
margin-top:auto;
margin-bottom:auto;
margin-right:auto;
margin-left:2em;
width:auto;
}
#sommario-svezia.subsection{
margin-top:2%; margin-bottom:2%;
margin-left:2%;
margin-right:2%;
width:100%;
}
#regione-halland.subsubsubsubsubsection{
margin-top:6%;
margin-bottom:2%;
width:auto;
}
#vaestra-goetaland.subsubsubsubsubsection{
margin-top:6%; margin-bottom:2%;
width:auto;
}
#laen-svezia.subsubsubsubsection{
margin-top:8%; margin-bottom:2%;
width:auto;
}

#rune-cellulare.subsubsubsection{
margin-top:12%; margin-bottom:2%;
width:auto;
}
#divisione-amministrativa-territorio-svedese.subsubsubsection{
margin-top:13%;
margin-bottom:2%;
width:auto;
}
#menu.subsection{
color:#000000;
background:#ffffff;
width:30%; padding: 0.5em;
border:1px solid white;
text-align:center;
font-size: smaller;
margin-right:5%;
margin-left:auto;
margin-top:auto;
margin-bottom:auto;
float:left;
}

#informazioni-generali.subsubsection a {
background-color:#ffcc00;
background-image:none;
color:#000000;
display: block;
text-align:center;
}
#in-svezia.subsubsubsection a {
background-color: #99ffcc;
background-image:none;
color: #000000; display: block;
text-align:center;
}
#in-italia.subsubsubsection a {
background-color: #ccffff;
background-image:none;
color: #000000; display: block;
text-align:center;
}
#arredamento-articoli-da-regalo.subsubsection a{
background-color: #cccccc;
background-image:none;
color:#000000;
display: block;
text-align:center;
}
#annunci.subsubsection a {
background-color: #ccccff;
background-image:none;
color: #000000;
display: block;
text-align:center;
}
#servizi-linguistici.subsection a{
background-color:#ffcc00;
background-image:none;
color:#000000;
display: block;
text-align:center;
}

#mediazione-merci.subsubsection a {
background-color: #00ffff;
background-image:none;
color: #000000;
display: block;
text-align:center;
}
#annunci-web.subsubsection a
{
background-color: #ccccff;
background-image:none;
color: #000000;
display: block;
text-align:center;
}
#contenuto-principale.subsection {
margin-top:10%;}
#top.subsection {
margin-left: auto;
margin-right:auto;
text-align:center;
margin-top:6%; margin-bottom:2%;
font-size:smaller;
}
#bottom.subsection
{margin-bottom: 2%;
margin-left: auto;
margin-right:auto;
margin-top: 5%;
}
table.beskrivning-semesterbostader{
margin-bottom:2%;
margin-left:auto;
margin-right:auto;
background-color:#ffffff;
color:#000000;
}



IMG {border:none;}
..one {
float:left;
clear:both;
margin-right:10px;
margin-top:10px;
margin-left:0px;
margin-bottom:0px;
}
..seven{
float: left; margin-left: 0;
padding: 15px; background-color:#0fffff;
color:#000000;
}



ul {
list-style: none;
margin-left: auto;
padding-left:0px;
}
OL {
margin-left:8%;
padding-left:5px;
}



}
li.bilder{
list-style:disc;

display:inline;
padding-left:10px;
padding-right:10px;
}

li.horizontal{
display:inline;
text-indent:7%;
margin:1%;
}


dt{
font-weight:bold;
}



#scaiecat-spa-gigi.subsection
{
background-image: url(/bilder/scaiecat-spa-gigi.jpg);
background-position: top right;
background-repeat: no-repeat;
background-color: #cccccc;
color:#ffffff;
float: right; margin: 2em; border: none;
height: 125px; width: 125px;
}
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Doesn't surprise me ...

At least the lines aren't so long. However, it is still a convoluted
mess.

It did not play any role whether the lines were long or short...

I got a parse error when I tried to validate it.
But I had to copy and paste the file.
The validator cannot validate https sites for CSS, I think.
 
D

dorayme

"Luigi Donatello Asero said:
It did not play any role whether the lines were long or short...

All this about formatting has to do with it being easy to read.
Nothing about validation. In science there is a relationship
between the simplicity of a theory and its truth only because
humans will likely make a complete hash of testing and assembling
a truly complicated theory. But there is no obvious reason, there
may be a reason but not an obvious one, why reality is
essentially simple. There is a reason why human theories need to
be. It has to do with the limitations of the human mind. Help
humans along Luigi and cast out the CSS and HTML and make
everything simpler. Be as a child and charm and disarm your
customers. Soothe us. Humour us. We are your friends. Have a
website just that you let us see. Let the non-friends have the
difficult one if a difficult one need be.
 
L

Luigi Donatello Asero

dorayme said:
All this about formatting has to do with it being easy to read.
Nothing about validation.
They are 2 different things.
What you were talking about had been a top priority if had planned to sell
the website to anybody else.

In science there is a relationship
between the simplicity of a theory and its truth only because
humans will likely make a complete hash of testing and assembling
a truly complicated theory. But there is no obvious reason, there
may be a reason but not an obvious one, why reality is
essentially simple. There is a reason why human theories need to
be. It has to do with the limitations of the human mind. Help
humans along Luigi and cast out the CSS and HTML and make
everything simpler. Be as a child and charm and disarm your
customers. Soothe us. Humour us. We are your friends. Have a
website just that you let us see. Let the non-friends have the
difficult one if a difficult one need be.


Spam is a problem nowadays and, in fact, I am wondering, whether I might let
only registered users get in touch by forms and
let all the others get in touch by snail mail.
 
L

Luigi Donatello Asero

dorayme said:
Sorry, I mean

"background-color: #cccccc;" can be condensed to
"background-color:#ccc;"

and while in this minimalist mood, you may be able to just use
the short form "background"...

All these things did not seem to affect the validation

I got this:

Line: 441

Parse error - Unrecognized : }


Where is the line 441?
 
B

Beauregard T. Shagnasty

Luigi said:
I got a parse error when I tried to validate it.
But I had to copy and paste the file.
The validator cannot validate https sites for CSS, I think.

Did you paste the file into this validator?
http://www.htmlhelp.com/tools/csscheck/

You have errors. Additionally, all those margins in percentages...
percentage of what? It is so difficult to tell. I always set margins
either as em units or maybe in a rare case, some number of pixels. But
percents? Why?
 
R

rf

Luigi Donatello Asero wrote

I usually ignore anything from dorayme and most most certainly ignore
anything Luigi but this one escaped my ignoring. So:
I got this:

Line: 441

Parse error - Unrecognized : }


Where is the line 441?

<quote src="luigi's hideously bloated CSS file">

OL {
margin-left:8%;
padding-left:5px;
}

}
li.bilder{
list-style:disc;
display:inline;
padding-left:10px; <-- *
padding-right:10px;
}

</quote>


* line 441 is right here. Of course you have changed it between your post
and my reading so your and my line numbers are a bit out.

In any case:

Can anybody besides me see a spare } floating around in there?

Luigi you are either a well established troll or you are a bloody idiot. In
the latter case you should hire a second professional man to assist you with
your one man business web site. What you have at the moment, and what I have
seen over the years that I have been following you, fails dismally.
 
L

Luigi Donatello Asero

rf said:
Luigi Donatello Asero wrote
Luigi you are either a well established troll or you are a bloody idiot. In
the latter case you should hire a second professional man to assist you with
your one man business web site.

I am not interested.
Can you understand that?
 
B

Beauregard T. Shagnasty

Luigi said:
All these things did not seem to affect the validation

I got this:

Line: 441

Parse error - Unrecognized : }

Where is the line 441?

Can't say exactly; you apparently are changing the file periodically.
However:

OL {
margin-left:8%;
padding-left:5px;
}



} <--- EXTRA BRACE
li.bilder{

See what I mean about having a well-structured file?
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Did you paste the file into this validator?
http://www.htmlhelp.com/tools/csscheck/

You have errors. Additionally, all those margins in percentages...
percentage of what? It is so difficult to tell. I always set margins
either as em units or maybe in a rare case, some number of pixels. But
percents? Why?

Because percentages are no absolute units, so they should fit both to a
large and a small window.
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Can't say exactly; you apparently are changing the file periodically.
However:

OL {
margin-left:8%;
padding-left:5px;
}



} <--- EXTRA BRACE
li.bilder{

See what I mean about having a well-structured file?

This has been fixed but the scrolling bars are still there although the css
external style sheet validates
(and I have not solved my problems with Chinese, by the way, do you know a
very good site about Chinese radicals?)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top