Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I would like to center Wordpress featured image on my site: https://link.do/ibXD8
I cannot find suitable option in theme properties.
Add this rule to your CSS:
.page-header-image.grid-parent {
text-align: center;
}
This element contains the image and has full width: Since the image is an inline element, text-align: center; will center it inside its container.
https://wordpress.org/support/topic/center-featured-imagine/
Add below css code it may fix your problem .
.attachment-post-thumbnail {
margin: 0 auto;
}
or
. image {
text-align: center;
}
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I've been having issues center aligning the contents of a div in a wordpress site I made. The site is http://www.triplebs.ca and I want the "subscribe to our newsletter" div to have everything in it centered, but can't figure it out. Can anyone help me out here?
Add this to your css:
.newsletter-widget, .widget_newsletterwidget {
text-align: center !important;
}
Add following CSS rules:
.newsletter-widget p {
display: inline-block;
}
Also you need to add to the closest form tag:
text-align: center;
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am fixing up a website for a tech night at my school. The navbar was on the side which isn't my favorite view for the bar so I put it on top, but I can't get the table data or menu to center in the div.
http://jsfiddle.net/ksta1584/c88qswsx/
<a href="http://jsfiddle.net/ksta1584/c88qswsx/">Link<a/>
I would also like instead of the lines disappearing when you scroll over that they are all in equally sized boxes and the boxes sort of "pop" out. I'm not sure how to do that and can't get the border to appear.
Do this in your .nav:
.nav {
width: 100%;
text-align: center;
position:relative;
top:35%;
}
Put margin:0 auto into your .nav rule
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I'm havng this small problem with my dropdown menu.
I need the width fit the content inside the content
In my css I'm using
width: -ms-max-content;
width: -webkit-max-content;
width: -moz-max-content;
width: -o-max-content;
But it´s not working on IE, is there another method for doing this?
Thanks
Can you please try this code?
ul li a{
white-space:normal;
}
Get rid of the pull-left classes on your images, then it will work without having to use max-content.
Working Bootply
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am working on a beginner project as I am new into web dev/design and am trying to center these images. I've included a link with screenshots of my code and the webpage in Firefox.
What normally works if your images are not wrapped in another div.
.grid {
margin:0 auto; // Shortcut for margin-left:auto and margin-right: auto
width: 1000px;
text-align: center;
}
What it does is align all of the contents to the center of the div.
However since all of your images are wrapped in another element they will not center depending on your styling of container elements.
What i would say is the best way to approach your issue:
http://jsfiddle.net/c0oku4zu/2/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have a page set up however I am having trouble aligning the news articles to the center of the page.
Here is a link to what I have so far -
http://casb1.cloudapp.net/1016/1be61016ff9a717aa34c2adf7c5aa79e/3D%20Design/news%20articles/news.html
Basically I need the red area to always be the same distance from the edges, even when it expands. Is this possible?
The red container has the css of position:absolute
Any help would be hugely appreciated.
PS. this is only my first week of learning css and html so please forgive me if it is something simple.
Thanks
I think you don't need the position:absolute you can delete this property and add this:
.collection {
display:table;
margin:auto;
}
There's a lot that can be impoved, but going to your question, I'd do something like this:
.collection {
position: static;
display: inline-block;
}
.roundcont {
text-align: center;
}
You basically need to remove the position: absolute; attribute from your .collection element and change its display to inline or inline-block and then set text-align center; to its parent div so now it looks centered.