How to Align Images Side by Side with Anchor Text? - css

I want to align two images side by side with anchor text below images. I need CSS code. Please Help. Please also check below Screenshot.

.left, .right {display:inline-block;}
div>a{display:block;}
There are so many ways to do this, here is the simplest one, link to codepen:
http://codepen.io/damianocel/pen/KzQPBm

Related

Center Navbar in Wordpress

I got 2 different menus (left aligned and right aligned) I wanted to center them, the theme support didn't help me. This is my first post, I am sorry if I make any mistakes. As I can imagine a css code should fix it, I tried to add it by myself but the code isn't changing anything.
Thanks for helping!
greetings
Webpage Image
Not sure how you structure the nav area, but you can try these two ways:
Make an upper div include the logo and two nav lists around the logo, and in its CSS, set the width and put margin: auto.
If I get it right, you will have three divs under your nav, one for your logo, and two for the nav lists around the logo. In this scenario, try to put below lines into your nav css:
display:flex;
justify-content:center;

Confusion about css floats in my project

I'm always stuck when it comes to float. In my grid project, I want to have my buttons in the left and my table in the middle, like in the shown example. And my footer should be bottom but i don't know for what reason is not https://codepen.io/coderBoyNaN/pen/wprOMX. Can anyone help? Exemple of how it should look like, i wanna make it more responsive: https://codepen.io/Soheevich/pen/VybrOo.
Just erase float: left from div#menu
https://codepen.io/anon/pen/zpEXdP

Cannot center text in HTML/CSS

The problem is (which you can see in the pictures below) that the "doner", "Wallet", and "Amount" aren't centered on the page.
I've tried changing the margin and padding and moving divs around and etc, but nothing seems to be working and I don't understand what is wrong or how to fix it. (it is hard to see in the code snippet because it's not full screen so I'm just going to give a link to the HTML here)
The only issue I can find is when I inspect element on google chrome. When I hover my mouse over <div class="container"> (the one underneath div class="learn-more">) It shows that the div container is wider on the right side, but I can't find why!
Thanks for the help! If you need any clarification please ask, I couldn't find anything to fix my problem online so I came here.
Here's a picture of what I mean as well:
The essential problem with your code is the markup. You're using the Bootstrap & putting some div directly inside the container & then another container inside this div. See what I mean:
Here are the first three rules from the 3rd Bootstrap documentation you should follow when building your HTML:
Rows must be placed within a .container (fixed-width) or
.container-fluid (full-width) for proper alignment and padding.
Use rows to create horizontal groups of columns.
Content should be placed within columns, and only columns may be
immediate children of rows.
So, my suggestion is to revise your HTML layout and use the Bootstrap as it intended instead of applying some hacks.
Start from rearranging containers in the way that the content would be put inside columns and all of the wrappers would be outside of the containers or inside the columns.
put your content that you want to center in a div like
<div class="box">your content...</div>
in your css file just add this :
.box{
display:inline-block;
position:relative;
left:50%;
transform:translateX(-50%);
}
you can also use a float left for your 3 titles and set the same witdh and height for the three with text-center proprety

div containers and alignment

this is my first time asking a question so please forgive me if I'm not asking the right questions. I'm having a problem with my website and I'm pretty sure it's somewhere in the divs and containers. I'm trying to keep the navigation at the top and I want to put some content underneath. The problem is the content isn't showing up. Also, I made a "spacer" id to push the text down where I wanted it. I'm not really sure how to align the text at the bottom without it. If anyone could help with that also, I would appreciate it.
I don't know which parts I should post so if it's any easier, I can just post the links to the page and the .css.
The page is:
http://www.preferredcaskets.com/Untitled.html
The CSS is:
http://preferredcaskets.com/nav.css
Again, forgive me if I'm not asking the right questions. It's late and I'm a little confused at the moment.
Thank you.
You've put your background in an <img> tag, and given it position:fixed, which automatically places it on top of your other content. Quick fix: add 'style="z-index:-1;" to the <img> tag. A Better way is to add it as a background to your body (and also more semantically correct, since the background is not part of your content).
css:
body{
background-image: url("images/bg.jpg");
}
Try display inline in spacer
#spacer {
height:110px;
width:auto;
display:inline;
}
JSFiddle - http://jsfiddle.net/a4enG/

How to stop DIV element from getting pushed down in table?

Any clue how to stop a DIV element from getting pushed down in a table?
Here's the page: http://www.panabee.com/domain-name-generator/healthy%20food
As you can see, the "Variations" DIV element in the left-hand side is pushed down unnaturally. It should be top aligned with the "Ask for help..." image, but for some reason the presence of the image pushes down the Variations" DIV element. If I replace the image with a little text, the top boxes in the two columns are again top aligned.
Any clues?
Thanks!
P.S. Feel free to offer feedback/suggestions on the site, too! Thanks all.
you need to add to your css vertical-align:top; for #main_box
add vertical-align: top; for #main_box. Because you have the reset, the td takes vertical-align: baseline; and override the "valign=top" in html.
The anchor a tag in your right side bar (inside the ask_for_help div) has a vertical-align of baseline. Remove that and you will be good to go.
you need to add to your css vertical-align:top; for #main_box

Resources