Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa HTML Div file in css

Have Programming Question? Ask it here!
 
 
 


Java Coder
Div file in css
1 Answer(s)      3 years and 4 months ago
Posted in : HTML


How can i indent div with outer and inner margin?


Advertisement
View Answers

March 17, 2011 at 12:42 PM


You need to wrap it in another div. For example, make the outer div margin: 0 auto; and the inner div margin-left: 50px

That will indent its left margin by 50 pixels from the middle.

Indent div in css

<html>
<head>
    <title>Indent div in css</title>
    <style>
        #outer {
            margin: 0 auto; 
            width:200px;
            background-color:red; 
        }

        #inner {
            /*move the whole container 50px to the left side*/
            margin-left:-50px; 
            margin-right:50px;
            /*or move the whole container 50px to the right side*/
            /*
            margin-left:50px; 
            margin-right:-50px;
            */
        }
    </style>
</head>
<body>
<div id="outer">
    <div id="inner">
        This is the result!
    </div>
</div>
</body>
</html>


Related Tutorials/Questions & Answers:
div align left css
div align left css  Hi, How to align the div to left using the css in HTML page. Thanks
indent div css
Div file in css  How can i indent div with outer and inner margin.... Indent div in css <html> <head> <title>Indent div... it in another div. For example, make the outer div margin: 0 auto; and the inner div
Advertisements
indent div css
/answers/viewqa/HTML/17553-indent-div-css.html :Indent DIV in CSS...indent div css  How can i indent with outer and inner margin?  
regarding css file in my eclipse
regarding css file in my eclipse  hai frns i want a small help frm u.when ever i use css file in html or normal web browsers the output is coming means css file is effecting the output but wen i use the same code in myeclipse
How to make a horizontally Scrollable grid in jsp using div, table, css, javascript?
How to make a horizontally Scrollable grid in jsp using div, table, css, javascript?  In a jsp page InsertUpdate.jsp (say) there is a button Insert to Save data in the database.I want that on clicking Insert button, besides
CSS
CSS  Make a navigation button using a div with a link inside it. Give it a border, background, and text color, and make them change when the user... style sheet validates at Note that some warnings may be unavoidable, but your CSS
Getting Parameter from a css styled jsp file to a java servlet file...
Getting Parameter from a css styled jsp file to a java servlet file... .../css" media="screen" /> <!--[if IE 6]><link rel="stylesheet" href="style.ie6.css" type="text/css" media="screen" /><![endif]-->
How to align div side by side?
will explain you how you can align the div side by side using CSS. The CSS... a container DIV and then put any number of DIV inside the container div and using CSS all these div's get aligned side by site. Here is the code of the CSS
passing values between jsp file through hyperlink in div tag
passing values between jsp file through hyperlink in div tag  <... type='text/css' rel='stylesheet' href='/css/crec.css' /&gt; &lt...; &lt;/tr&gt; &lt;/table&gt; &lt;br&gt; &lt;div
passing parameter from Java code to CSS file - Design concepts & design patterns
passing parameter from Java code to CSS file  hi, i have to pass a string variable from by java code to a CSS file so that i can use that variable in my CSS file. Plz help me as soon as possible
Implementing CSS and JavaScript in JSP File
Implementing CSS and JavaScript in JSP File..., the following code imports style.css file from css folder <link rel="... file is used for field validation. Directory Structure of css and script
DIV in HTML
DIV in HTML  What is DIV in HTML
CSS in flex
dynamically loading of CSS file is not supported in flex. you can compile the CSS file in swf and use it dynamically in your application. Loading style sheets at run time is a three-step process: 1. Write a CSS file for your application
Working with CSS(CSS Manipulation)
Working with CSS(CSS Manipulation)       Working with CSS(CSS Manipulation) These methods are used to manipulate CSS specially by getting and setting
HTML CSS
HTML CSS  Explain in brief about the term CSS
CSS ScrollBar Properties
CSS ScrollBar Properties  How can i set ScrollBar properties in CSS? I am using HTML, CSS and Div in my code. Thanks!!   overflow: scroll; overflow-y: scroll; overflow-x: scroll; overflow:-moz-scrollbars-vertical
CSS Apply
CSS Apply  How can I apply different CSS to my application for background by taking CSS list in Select tag i.e. Combo box. for e.g As in Orkut we select theme & by clicking to apply it changes background theme & color
css
css
css
CSS in Flex
CSS in Flex  Hi...... Please tell me How do you use css styles in flex? Thanks  Ans: @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .button{ font
Include CSS in HTML
Include CSS in HTML  Can any one tell me how to include a CSS file into my HTML page. A code format to include the CSS will work. Thanks in Advance.   Include CSS in HTML To include a CSS or Style Sheet into you HTML
HTML CSS example
-color: lightgrey; } p { color:red; } </style> To include css file...HTML CSS example  Hi, Can anyone share the HTML CSS example code. I my HTML web page I have to embed the CSS style. Share some HTML CSS example
jQuery To Hide the Div
to develop the Hide of a Div . Step 1:       Create a new file... on the div and having correponding style css. divClass .deleteDiv { position... jQuery To Hide the Div      
css click box
css click box  I wanted to create a click box in CSS with a hyperlink that should appears flat.   Find the below given code.. In your HTML file .. click box Text CSS a { display:inline-block; width:30px
Showing div at the center of the webpage
Showing div at the center of the webpage  Showing div at the center of the webpage
What are the advantages and disadvantages of CSS?
What are the advantages and disadvantages of CSS?  What are the advantages and disadvantages of CSS
CSS Editor
at-rules and selectors in a CSS file selectable, pluggable CSS profiles... CSS Editor         This project aims to contribute sophisticated CSS authoring
class of div tag
class of div tag  How can i recognize the selected DIV class
div background color in html
div background color in html   How to change the background color of DIV in HTML
scrolling div ipad
scrolling div ipad   Please suggest me how to scroll the div in iPad UIWebView? Thanks
jQuery CSS Selector
jQuery CSS Selector       jQuery CSS Selector In this section we are learning about the jQuery CSS Selector. The CSS Selectors is the powerful API provided
jQuery Toggle the Div
the Div where id is "div1" and having style css #div1 { width:70... jQuery Toggle the Div      ... of a Div Steps to develop the Toggle of a Div . Step 1:       Create
div overflow hidden
div overflow hidden  How to make div overflow hidden? Thanks   Hi, Here is the code: <div style="widht:200px; height:600px; overflow:hidden;"> </div> Thanks
div style background
div style background  How to add background color to a div? What is the code of div style background?   Hi, You can use the following code: <div style="background-color: #ccffcc;"> <p>Content</p> <
parser jquery css
parser jquery css  How to parser jquery in css
div style float right
div style float right  How to align div to right? Share me the code for div style float right. Thanks   Hi, You can use following code: <div style="float: right; widht:300px; height:600px;"> <p>Content<
CSS Designer
CSS Designer         CSS Designer is now availabe as part of the Web Designer. JointLogic CSS Designer is an Eclipse plugin that provides CSS authoring facilities
div to scrollbar - Java Beginners
vertical scrollbar. for this i am using a css for that div in which i tried to add...div to scrollbar  hi, thanks a lot for replying but my question is some what different let me make it more clear i have div which increases in size
Resize Header in CSS
;We can resize header tags in CSS .. and further call that class into you HTML file. h1{ font-size:60px;} h2{ font-size:48px;} h3{ font-size:36px
remove and add div jquery
remove and add div jquery  I want to enable my users to remove or add DIV using JQuery.   $('.add_more').click(function(){ var description = $('#description').val(); $newEl = $('<div class="description_text
image on div or cell of table
image on div or cell of table  I am using ms access database and I... but it display on browser but I want to display on inside the div tag or table tag pls... is to display on div or table... thnx in advance
image on div or cell of table
image on div or cell of table  I am using ms access database and I... but it display on browser but I want to display on inside the div tag or table tag pls... is to display on div or table... thnx in advance
image on div or cell of table
image on div or cell of table  I am using ms access database and I... but it display on browser but I want to display on inside the div tag or table tag pls... is to display on div or table... thnx in advance
image on div or cell of table
image on div or cell of table  I am using ms access database and I... but it display on browser but I want to display on inside the div tag or table tag pls... is to display on div or table... thnx in advance
image on div or cell of table
image on div or cell of table  I am using ms access database and I... but it display on browser but I want to display on inside the div tag or table tag pls... is to display on div or table... thnx in advance
image on div or cell of table
image on div or cell of table  I am using ms access database and I... but it display on browser but I want to display on inside the div tag or table tag pls... is to display on div or table... thnx in advance
background images in css not working
background images in css not working  In the application i'm passing a background image from CSS in the given format ... background-image: url... of adding background images in css
link border 0 css
link border 0 css  Hi, What will the css for making links border 0 in image? I am looking for example code for link border 0 css. Thanks
working of a div tag in html
working of a div tag in html   !DOCTYPE html PUBLIC "-//W3C//DTD...;body> <div style="width:100%; height:650px; background-color:#FF0000;"> <div style="background-color:#990066; width:100%; height:20
Advertisements
 

 

 

DMCA.com