answersLogoWhite

0


Best Answer

To increase readability or make it look pretty. Maybe you just want to be different.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why would you use padding inside a div container?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you give me the CSS code to a table that has a fixed height and width but scrolls vertically to view text?

you can place that table inside a container <div>, likely shorter than the table itself, then set the overflow of that <div> to either auto or scroll. Most browsers will default to scroll when auto is selected. What this does is tell the browser to create a scroll bar in the div for any content that extends below the height of the container. Because it is creating a scroll bar inside the div make sure you have room on the right side of the container to allow the bar to appear without blocking content. For example, in your CSS document: div.tablecontainer { height:500px; overflow:scroll; padding-right:20px; } table { height:1000px; width:80%; }


What is web container?

depends what code you're talking about. if it's html, a container would be the code that contains content ("bla bla") <html> <head> <title> bla bla </title> </head> <body> </body> </html> in css, it would be whatever div tag you create such as: <div class="container"> bla bla </div>


How do you make div by using css?

You can make CSS inside a div but not div in CSS. CSS inside div could be done by : <do=iv style="">.


What does the prefix div mean?

<DIV> is not a prefix, it is a tag. A DIV element is a container for other HTML elements and is used for positioning and structuring content in the document


Can you create div in textarea in HTML?

No you can't. While you can put div tags inside textarea tags, as anything in the textarea is treated only as text, the browser will ignore the div tags and they will show as text only and so have no impact. So if you do want sections for text, you would have to look at other ways of doing it, like having several text areas with different formatting.


Can you use different divs in the background 'body' div without disturbing the overall flow of the 'container' div?

Yes, the easiest way to do this is to change the z-index of the div so it is generated on a different layer. An example you could do is below: <div style='position:absolute;z-index:-1;'> This will be behind the main div </div> <div> This is the main div </div>


What is cell padding in HTML code?

Cell padding is used in table and in div tags. You can add to create space around images and words. example: <table cellpadding="0" cellspacing="0">


How do you center your webpage?

Create a container DIV tag within the BODY tag and use CSS to center it in the browser.Example:Inside the CSS file.html body #container {width: 989px;margin: 0 auto;}Inside the HTML file:Page content here.


What is a div overlay?

from my limited knowledge a <div> is a tag used to make a "division" in the webpage (like tables but cleaner) the beauty of the <div> is that it doesn't have any visual effects as just <div> so it is perfect to use with css (<div class="name">} the word "class" would be represented in css as . and name would show as .name meaning you can set the height, width, colour, style, font etc.. for content that appears inside that div.


What is the Perimeter of a 4 X 6 square?

This is a trick question. A square by definition has four equal sides, therefore it cannot measure 4 x 6. A geometrical figure having four sides, right angles, and measuring 4 x 6 would be called a rectangle, not a square. And it would have a perimeter of 20. <p></p><p> </p>The definition of a square is that all four sides are equal.<div><br></div><div>Therefore your 4x6 is a rectangle, and not a square.</div><div><br></div><div>Perimeter would therefore be</div><div><br></div><div>4+6+4+6= 20.<div></div><div><br></div><div>Total all four sides of the rectangle. </div></div>


Names and their information of the latest viruses?

== <table style== "width: 320px; border: 1px solid gray; font: normal 12px sans-serif; background-color: white;"><tr><td colspan="2" style="background: white; color: black; padding: 5px;"><b style="font: bold 20px serif; display: block; margin-bottom: 8px;">What does your name mean?</b> <div style="font-size: 16px; margin-bottom: 4px;">Your Result: <b>LOYALTY</b></div><div style="width: 200px; backgroundTOOTHBRUSHES HELP OUR TEETH 1px solid black;"><div style="width: 74%; background: red; font-size: 8px; line-height: 8px;"> </div></div><p style="margin: 10px; border: none; background: white; color: black;">You have mostly loyalty in your life. Others trust you because you always tell the truth. Loyalty is one of the best things in life and you got it. Wether living up to a promise or tring to help someone not live it down, your turthful hart is always happy.</p></td></tr><tr><td style="color: black; background: white; padding: 3px;">JOY</td><td style="background: white; padding: 3px;"><div style="width: 100px; background: white; border: 1px solid black; margin-top: 4px;"><div style="width: 49%; background: red; font-size: 8px; line-height: 8px;"> </div></div></td></tr><tr><td style="color: black; background: white; padding: 3px;">Independence</td><td style="background: white; padding: 3px;"><div style="width: 100px; background: white; border: 1px solid black; margin-top: 4px;"><div style="width: 12%; background: red; font-size: 8px; line-height: 8px;"> </div></div></td></tr><tr><td colspan="2" style="text-align: center; padding: 8px;"><a href="http://www.gotoquiz.com/what_does_your_name_mean_3"><b>What does your name mean?</b></a><br><a href="http://www.gotoquiz.com/">Quiz Created on GoToQuiz</a></td></tr></table> ==


What is selectors in jquery?

Selectors are how you 'select' an element, or group of elements, to perform an action on. For instance $('div').hide(); Would hide all the <div> elements on a page. The selector is 'div', inside the jQuery command. $('div:first').show(); would show the first <div> element on the page. $('div#content ul li').addClass('action'); would add a class of 'action' to all the unordered list items in the <div> with an id attribute of 'content' jQuery has a very powerful selection language, based on xpath - very similar to CSS (if you're familiar) - so for instance $('div#content ul li.action:first').removeClass('action'); would find the first unordered list item with a class of action inside a <div> with an id attribute of 'content'. If you already have a group of elements selected, jQuery can allow you to find elements within that group. e.g. var group = $('div:first'); // finds first <div> on the page. $(group).find('ul li').removeClass(); Removes all the classes from unordered list items in the first <div> on the page. For the full description of jQuery selectors, see this page http://api.jquery.com/category/selectors/