Jump to content
  • 0

padding


Krote
 Share

Question

нужно сделать отступы для текста со всех сторон блока на 10px. Пишу padding:10px; слева текст отступает и вместо того чтобы переноситься на новые строчки тупо растягивает блок в стороны. Как исправить?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title>Документ Без Имени</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">
<div id="header"></div>
<div id="lsb"></div>
<div id="content">
<p>This sounds simple. But stop and think how many times you
retype the same old simple information.</p>

<p>Most people have cottoned on to automating their email
signature, but you can go far beyond that when it comes to
communicating words quickly.</p>

<p>Get yourself a clickboard or shortcut extender. This will
enable you to write much faster and prevent you from ever
having to type the same thing twice.</p>

<p>I use this utility http://www.howtocorp.com/typepilot , but
there are lots of other useful typing assistant utilities
available.
</p>
<p>Failing to manage your email effectively.</p>


<p>I know, there's so much spam flying around, but you should
be attempting to win this war with a few weapons of your
own installed on your computer.</p>

<p>i. Make sure you have a working piece of anti-spam software
set up. Whilst sometimes the wrong messages will get
trapped, the best software will still remove 98% of the
emails that you don't want. Make sure they are filtered
into a junk email file, so you can manually sift
through them afterwards and pull back any that have
been incorrectly assumed to be unwanted.</p>

<p>ii. Set up folders in your inbox and get yourself properly
organized. I keep a folder for SALES, another one for
FEEDBACK and others for JOINT VENTURES + many more.
</p>
</div>
</div>
</body>
</html>

css

/* CSS Document */

#wrapper{
width:700px;
min-height:500px;
border:1px solid #000;
margin:0 auto;

}
#lsb{
float:left;
width:190px;
min-height:490px;
border:1px solid #000;
}

#content{
margin-left:191px;
border:1px solid #000;
width:508px;
min-height:490px;
padding:10px;

}
#header{
width:700px;
height:100px;
border:1px solid #000;

}

Link to comment
Share on other sites

  • 0

спасибо) но тоже проблема появилась, если я вставляю скрипты на одинаковые колонки то все равно lsb получается меньше content a из за padding a

можно решить для всех p можно написать margin:10px;, но если мне придется вставлять таблицу то и ей прописывать margin надо будет

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy