How can I change the link lists position? - html

I am designing the footer of my website and have following Question:
How can I change my CSS so that it looks like this:
footer{
background-color: #e0ebeb;
list-style-type: none;
display: inline;
}
#Questions {
margin: auto;
text-align: center;
display: block;
padding: 0;
}
<footer>
<div class="Newsletter">
<h1>Get our Newsletter</h1>
<h2>Stay tuned and new gadgets everday!</h2>
</div>
<div class="secondpt" >
<div id="Questions">
<h1>Do you have a question </h1>
<ul>
<li>Contact us</li>
</ul>
</div>
<div id="Menu">
<ul>
<li>Home</li>
<li>Who are we ?</li>
<li>Newest</li>
<li>The Best</li>
</ul>
</div>
<div id="languages">
<ul>
<li>English</li>
<li>Deutsch</li>
<li>Français</li>
</ul>
</div>
</div>
<hr>
<div>
<h1>Connect with us</h1>
</div>
</footer>

you can achieve this using float property :
*{
font-size:15px;
}
ul {
list-style:none;
}
footer{
background-color: #e0ebeb;
list-style-type: none;
display: inline;
}
.secondpt {
width: 100%;
}
div#Menu {
float: left;
}
div#languages {
float: right;
}
.right{
float:right
}
.left{
float:left
}
<footer>
<div class="Newsletter">
<h1>Get our Newsletter</h1>
<h2>Stay tuned and new gadgets everday!</h2>
</div>
<div class="secondpt" >
<div class="left">
<div id="Questions">
<h1>Do you have a question </h1>
<ul>
<li>Contact us</li>
</ul>
</div>
</div>
<div class="right">
<div id="Menu">
<ul>
<li>Home</li>
<li>Who are we ?</li>
<li>Newest</li>
<li>The Best</li>
</ul>
</div>
<div id="languages">
<ul>
<li>English</li>
<li>Deutsch</li>
<li>Français</li>
</ul>
</div>
</div>
</div>
<hr>
</footer>

You have to set the width of div tags inside the #Questions to 30% and display them as inline-flex
footer{
background-color: #e0ebeb;
list-style-type: none;
display: inline;
}
ul{
list-style: none;
}
div#Questions div{
width: 30%;
display: inline-flex;
}
#Questions {
margin: auto;
text-align: center;
display: block;
padding: 0;
}
This will set the div tags side-by-side. Changes in html are mentioned in the comments.
<footer>
<div class="Newsletter">
<h1>Get our Newsletter</h1>
<h2>Stay tuned and new gadgets everday!</h2>
</div>
<div class="secondpt">
<div id="Questions">
<h1>Do you have a question </h1>
<div id="contact"> <!-- Add a new div tag -->
<ul>
<li>Contact us</li>
</ul>
</div> <!-- Closing #contact -->
<div id="Menu">
<ul>
<li>Home</li>
<li>Who are we ?</li>
<li>Newest</li>
<li>The Best</li>
</ul>
</div>
<div id="languages">
<ul>
<li>English</li>
<li>Deutsch</li>
<li>Français</li>
</ul>
</div>
</div> <!-- Close #Questions here -->
</div> <!-- Close .secondpt here -->
<hr>
<div>
<h1>Connect with us</h1>
</div>
</footer>

Related

how to keep a h title over a list if i use flexbox?

The question title is pretty much what i want to know.
How do I keep the title1,2,3 over the list and not in the left of it.
Do i need to add more classes?
.row {
display: flex;
}
<div class="row">
<h1>title1</h1>
<ul>
<li>listItem1</li>
<li>listItem2</li>
<li>listItem3</li>
</ul>
<h1>title2</h1>
<ul>
<li>listItem1</li>
<li>listItem2</li>
<li>listItem3</li>
</ul>
<h1>title3</h1>
<ul>
<li>listItem1</li>
<li>listItem2</li>
<li>listItem3</li>
</ul>
</div>
One easy solution is to add extra class called column (whith extra div tags) where you change the flex direction :
.row {
display: flex;
}
.column {
display: flex;
flex-direction: column;
}
<div class="row">
<div class="column">
<h1>title1</h1>
<ul>
<li>listItem1</li>
<li>listItem2</li>
<li>listItem3</li>
</ul>
</div>
<div class="column">
<h1>title2</h1>
<ul>
<li>listItem1</li>
<li>listItem2</li>
<li>listItem3</li>
</ul>
</div>
<div class="column">
<h1>title3</h1>
<ul>
<li>listItem1</li>
<li>listItem2</li>
<li>listItem3</li>
</ul>
</div>
</div>

div size doesn't equal top and bottom

In the following code I've found that the div size doesn't equal at the top and bottom of the ul.
The div still doesn't have equal size even though I put the padding equal.
What is wrong?
.footer {
background-color: #4dbce9;
padding: 40px 0;
text-align: center;
color: #fff;
}
.footer ul,
li {
display: inline-block;
}
.footer a {
font-size: 14pt;
padding-right: 20px;
color: #fff;
}
<div class="footer">
<div class="container">
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8">
<ul>
<li>
<a href="https://www.facebook.com/rony.fhebrian" />Facebook
</li>
<li>
<a href="https://www.twitter.com/ronyfhebrian" />Twitter
</li>
<li>
<a href="https://ronyfhebrian.wordpress.com" />Blog
</li>
<li>
<a href="mailto:rony.fhebrian#outlook.com">Contact
</li>
</ul>
</div>
<div class="col-md-2">
</div>
</div>
</div>
</div>
The <a> closing tag is missing.
.footer {
background-color: #4dbce9;
padding: 40px 0;
text-align: center;
color: #fff;
}
.footer ul,
li {
display: inline-block;
}
.footer a {
font-size: 14pt;
padding-right: 20px;
color: #fff;
}
<div class="footer">
<div class="container">
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8">
<ul>
<li>
Facebook
</li>
<li>
Twitter
</li>
<li>
Blog
</li>
<li>
Contact
</li>
</ul>
</div>
<div class="col-md-2">
</div>
</div>
</div>
</div>
Your ul element should look like this :
<ul>
<li>
Facebook
</li>
<li>
Twitter
</li>
<li>
Blog
</li>
<li>
Contact
</li>
</ul>
the 'a' link tag is not self closing
try to close the <a>tags ..
<div class="footer">
<div class="container">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<ul>
<li>
<a href="https://www.facebook.com/rony.fhebrian" />Facebook</a>
</li>
<li>
<a href="https://www.twitter.com/ronyfhebrian" />Twitter</a>
</li>
<li>
<a href="https://ronyfhebrian.wordpress.com" />Blog</a>
</li>
<li>
Contact
</li>
</ul>
</div>
<div class="col-md-2"></div>
</div>
</div>
</div>

How to I remove the indent caused on either side of each blog post?

I am using Tumlbr and wish remove an indent made either side of each post. I would prefer to have the blog posts width to be 100%. Thanks in advance. The url to the website which I am editing is http://jarroldtheme.tumblr.com.
<!DOCTYPE html>
<html>
<head>
<title>{title}</title>
<link rel="shortcut icon" href="{Favicon}">
<link rel="alternate" type="application/rss+xml" href="{RSS}">
{block:Description}
<meta name="description" content="{MetaDescription}" />
{/block:Description}
<style>
header h1 {
color: {TitleColor};
font-family: {TitleFont};
font-weight: {TitleFontWeight};
text-align: center;
font-size: 35px;
padding-top: 20px;
padding-bottom: 4px;
}
header p {
color: black;
font-family: helvetica;
text-align: center;
font-size: 18px;
}
header a {
color: {TitleColor};
text-decoration: none;
}
.page {
text-align: center;
padding-top: 25px;
}
.page a {
text-decoration: none;
border-bottom: 1px solid #000;
font-size: 16px;
margin-left: 5px;
margin-right: 5px;
padding-bottom: 3px;
}
body {
background: {BackgroundColor};
font-family: helvetica;
}
.post {
text-align: center;
padding-top: 45px;
padding-bottom: 45px;
list-style: none;
}
.link-post {
background: #000;
}
.like-reblog {
list-style: none;
}
.like-reblog li {
float: right;
padding: 6px;
}
.quote-source {
padding:20px;
font-style: italic;
}
form {
text-align: center;
}
.sfm input {background-color: #f5f5f5;
font-size: 9px;
border: 0px;
text-transform: lowercase;
margin-top: 0px;
color: #999;
letter-spacing: 1px;
padding: 4px 8px;
font-family: helvetica, arial;}
input[type="submit"] {
background: #900000;
color: white;
}
</style>
</head>
<body>
<header>
{block:haspages}
<div class="page">
{block:pages}
{Label}
{/block:pages}
</div>
{/block:haspages}
<h1>{title}</h1>
{block:Description}
<p>{Description}</p>
{/block:Description}
<form action="/search" method="get" class="sfm">
<input type="text" name="q" value="{SearchQuery}" id="sf"/>
<input type="submit" value="Search" id="sb"/>
</form>
</header>
<ol>
{block:Posts}{block:Text}
<div class="post">
<li>
{block:Title}
<h3>{Title}</h3>
{/block:Title}{Body}
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Text}{block:Photo}
<div class="post">
<li>
<img src="{PhotoURL-500}" alt="{PhotoAlt}"/>
{block:Caption}
{Caption}
{/block:Caption}
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Photo}{block:Panorama}
<div class="post">
<li>
{LinkOpenTag}
<img src="{PhotoURL-Panorama}" alt="{PhotoAlt}"/>
{LinkCloseTag}{block:Caption}
{Caption}
{/block:Caption}
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Panorama}{block:Photoset}
<div class="post">
<li>
{Photoset-500}{block:Caption}
{Caption}
{/block:Caption}
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Photoset}{block:Quote}
<div class="post">
<li>
"{Quote}"
{block:Source}
<div class="quote-source">{Source}</div>
{/block:Source}
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Quote}{block:Link}
<div class="post">
<div class="link-post">
<li>
<a href="{URL}" class="link" {Target}>{Name}</a>
{block:Description}
{Description}
{/block:Description}
</li>
</div>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Link}{block:Chat}
<div class="post">
<li>
{block:Title}
<h3>{Title}</h3>
{/block:Title}
<ul>
{block:Lines}
<li class="{Alt} user_{UserNumber}">
{block:Label}
<span>{Label}</span>
{/block:Label}{Line}
</li>
{/block:Lines}
</ul>
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Chat}{block:Video}
<div class="post">
<li>
{Video-500}{block:Caption}
{Caption}
{/block:Caption}
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Video}{block:Audio}
<div class="post">
<li>
{AudioEmbed}{block:Caption}
{Caption}
{/block:Caption}
</li>
<ul class="like-reblog">
<li>{block:NoteCount}{NoteCountWithLabel}{/block:NoteCount}</li><li>{likebutton}</li><li>{reblogbutton}</li>
</ul>
</div>
{/block:Audio}
{/block:Posts}
</ol>
</body>
</html>
If what you mean is that you are trying to get the elements with the post ID to move all the way to each side you can try by setting the padding of the ordered list to 0. Checked it using Chrome dev tools.
`ol{padding: 0;}`
I would also recommend using a css reset to remove the browser default styles like normalize.css. They really help out a ton
Edit: To move the black box all the way over, you can set the margin of the body to 0 on both the left and right:
body{margin:auto 0;}
a CSS reset could help you avoid doing all this ^.^

Is there a way using **CSS only** (not JS) to hide an entire list item or div if a part of it is being cut off via overflow:hidden?

Firstly this question has been before (in a fashion) but without examples: Hiding an element completly that has had some overflow hidden
The Problem
I'm using the Gridster framework http://gridster.net/ to display some content and it uses a fixed height on each content area with overflow:hidden.
The content that I place in each content area could be 10 characters long or 100 characters (in a responsive framework) bootstrap and so can sometime get cut off.
Supporting Images
How it looks now
How I would like it to look
Example code
HTML
<div class="example_container">
<div class="WidgetContent pull-left">
<ul class="unstyled">
<li class="person ActivePerson">
<div class="StaffThumb pull-left">
<img src="https://cdn1.iconfinder.com/data/icons/dot/256/man_person_mens_room.png">
</div>
<div class="expert-details pull-left">
<ul class="innerBox unstyled">
<li>
James Harris
</li>
<li>Senior Management</li>
<li>London</li>
<li>VP, Marketing Communications</li>
</ul>
</div>
<div class="container-number pull-right">
<span class="label">76</span>
</div>
</li>
<li class="person ">
<div class="StaffThumb pull-left">
<img src="https://cdn1.iconfinder.com/data/icons/dot/256/man_person_mens_room.png">
</div>
<div class="expert-details pull-left">
<ul class="innerBox unstyled">
<li>
Carlos Fernandez
</li>
<li>Senior Management</li>
<li>Madrid</li>
<li>Senior Business Development Coordinator</li>
</ul>
</div>
<div class="container-number pull-right">
<span class="label">72</span>
</div>
</li>
<li class="person ">
<div class="StaffThumb pull-left">
<img src="https://cdn1.iconfinder.com/data/icons/dot/256/man_person_mens_room.png">
</div>
<div class="expert-details pull-left">
<ul class="innerBox unstyled">
<li>
Kate Evans
</li>
<li>Research</li>
<li>London</li>
<li>Communications Systems Analyst - Millar A/C Manager</li>
</ul>
</div>
<div class="container-number pull-right">
<span class="label">71</span>
</div>
</li>
<li class="person ">
<div class="StaffThumb pull-left">
<img src="https://cdn1.iconfinder.com/data/icons/dot/256/man_person_mens_room.png">
</div>
<div class="expert-details pull-left">
<ul class="innerBox unstyled">
<li>
Brian Montrose
</li>
<li>Business Development</li>
<li>New York</li>
<li>Business Development Analyst</li>
</ul>
</div>
<div class="container-number pull-right">
<span class="label">70</span>
</div>
</li>
<li class="person ">
<div class="StaffThumb pull-left">
<img src="https://cdn1.iconfinder.com/data/icons/dot/256/man_person_mens_room.png">
</div>
<div class="expert-details pull-left">
<ul class="innerBox unstyled">
<li>
Alison Roberts
</li>
<li>HR</li>
<li>San Francisco</li>
<li>HR - Pension</li>
</ul>
</div>
<div class="container-number pull-right">
<span class="label">68</span>
</div>
</li>
</ul>
</div></div>
CSS
.example_container { width:300px; height:325px; overflow:hidden; }
.WidgetContent {
width: 100%;
position: relative;
}
.pull-left {
float: left;
}
.pull-right {
float: left;
}
ul.unstyled, ol.unstyled {
list-style: none outside none;
margin-left: 0;
padding:0;
}
.ActivePerson {
background-color: #FCF8E3;
}
.person {
border-bottom: 1px dashed #E2E2E2;
display: block;
padding: 7px 50px;
}
li {
overflow: hidden;
}
.StaffThumb img {
border-radius: 3px;
height: 35px;
margin: 4px 10px 0 0;
width: 35px;
}
.StaffThumb {
left: 10px;
margin: 0;
position: absolute;
}
.container-number {
position: absolute;
right: 10px;
}
.ActivePerson .label {
background-color: #F89406;
}
.label {
font-size: 16px;
line-height: 20px;
margin: 0 5px;
position: relative;
top: 5px;
border-radius: 3px;
padding: 1px 4px 2px;
}
Example Fiddle
http://jsfiddle.net/3sTNL/
This little extra CSS: Uses flex layout
.WidgetContent {
height: 100%;
}
.WidgetContent > .unstyled {
margin: 0;
display: flex;
flex-direction: column;
flex-wrap: wrap;
float:left;
height: 100%;
}
.person {
position: relative;
}
fiddle here
YES!
Add column-width to the ul, equal to the container's width.
Add height to the ul, equal to the container's height minus padding/margin
Add break-inside:avoid (-webkit-column-break-inside) to the .people items
Result: http://jsfiddle.net/3sTNL/3/ (Tested in Chrome)
This is VERY haxy XD But it works!

HTML/CSS webpage structure

Got a small issue with this website structure: www.bigideaadv.com/xsp
Looking to have this container fill the middle of the screen between the top and bottom navigation. I'd also like to have the middle collapse with the resizing of the window with a scrollbar. Can't seem to make it work quite right. Anyone have any thoughts?
<div id="top_navigation">
<div id="navigation_inside">
<ul id="navigation">
<li>Schedule Demo</li>
<li>Sales</li>
<li><p style="float:left; margin:0;">Search</p> <form style="margin:0 0 0 5px; padding:0; float:left;"><input class="search" type="text" /><input type="hidden"></form></li>
</ul>
<ul id="navigation2">
<li>Home</li>
<li>About</li>
<li>Products</li>
<li>People</li>
<li>News + Events</li>
<li>Contact</li>
</ul>
</div>
</div>
<div id="container">
<div id="scroller">
</div>
</div>
<div id="bottom_navigation">
<div id="twitter_bar">
<div id="twitter">
<h5><img src="images/twitter_bird.png" width="23" height="16" /> <b>#XSPGlobal:</b> </h5>
<p>Loading...</p>
<noscript><h5>This feature requires JavaScript</h5></noscript>
</div>
</div>
<div id="blog_posts">
<p>Here is where the blog posts will go.</p>
</div>
<div id="bottom_navigation_inside">
<ul>
<li>Partners</li>
<li>Interfaces</li>
<li>Careers</li>
<li>XACT Blog</li>
<li>Milestones</li>
<li>Awards + Recognition</li>
<li>Client Testimonials</li>
<li>Press Releases</li>
<li>Social Responsibility</li>
<li>Privacy Policy</li>
<li>Terms & Conditions</li>
</ul>
</div>
<div id="social_links">
<img src="images/facebook.png" width="23" height="24" />
<img src="images/twitter.png" width="23" height="24" />
<img src="images/linkedin.png" width="23" height="24" />
</div>
</div>
CSS:
#container {
margin: 72px 0 72px 0;
width: 100%;
height: 100%;
}
#top_navigation {
position: fixed;
min-width: 1010px;
width: 100%;
height: 72px;
background: url('../images/opaque.png') repeat;
text-transform: uppercase;
}
#bottom_navigation {
position: absolute;
min-width: 1010px;
width: 100%;
height: 172px;
background: url('../images/opaque.png') repeat;
text-transform: uppercase;
}
set the container to position fixed with a top of 72px and a bottom of 172px.