/    Sign up×
Community /Pin to ProfileBookmark

Making a container and placing it at the middle of the page?

I’m trying to create [URL=”https://v3rgl1eakgd.tumblr.com/PZ1gtRV3/”]this site[/URL] and [URL=”https://codepen.io/Dragonknigh/pen/BJeMzP”]this is the code I have right now[/URL]. How do I make a container and place it just like on the “this site”? How do I insert an image instead of “go to site” button? And make it all responsive just like on “this site”?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@bharti_panjwaniJan 30.2018 — Hi ,

For center --> You should specify width of the container and then give it margin : auto


for example :

[CODE]

.container{
margin: auto;
width: 40%;
border: 2px solid Red;

}
[/CODE]


and if you want to make it responsive use bootstrap classes ...and if you want to make your css, responsive .You should use "%" instead of "px " while declaring height and width ... and you have to use "em" for fonts

for example:

[CODE]

.ClassResponsive
{
height:40%;
width:100%;
font-size:1 em;
}

[/CODE]
×

Success!

Help @Dragonknigh spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...