Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css horizontal center

#inner {  
	margin: auto 0;
}

#outer {
  width:100%;
  display: flex;
  justify-content: center;
}


<div id="outer">
  <div id="inner">Foo foo</div>
</div>
Comment

how to horizontally center in css

.<your-outer-div> {
  display: flex;
  justify-content: center;
  ('align-items: center' will allow you to vertically center too ;))
}
Comment

horizontal centering (css)

.container {
  width: 980px;
  margin: 0 auto;
}
Comment

PREVIOUS NEXT
Code Example
Css :: move button to right css 
Css :: css grid wrap columns 
Css :: grid center 
Css :: gradient border with border radius 
Css :: image float animation css 
Css :: css flex reverse order 
Css :: line break doesnt work css 
Css :: install cors 
Css :: transition transform 
Css :: aligning form elements to center in css 
Css :: css logo color 
Css :: how to link fonts css 
Css :: css photo circle 
Css :: div fit content height 
Css :: font-weight css 
Css :: limit text size 
Css :: beige hex code 
Css :: flex max slang meaning 
Css :: how to add background image in styled components 
Css :: css blur background behind div 
Css :: text glow effect 
Css :: Responsive font size with clamp 
Css :: blue color when button click web mobile 
Css :: android studio cardview background transparent 
Css :: how to make slideshow not go over navigation bar 
Css :: how to add inline class to a paragraph in css 
Css :: dont brake text in css 
Css :: vscode set terminal letter spacing 
Css :: html5 input required length 
Css :: css rotate 3d 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =