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.
Related
I want to make a dropdown in my navbar , all the css is working except for the hover pseudo class,
the dropdown had display none div.nav-dropdown{ display: none;} ,
and the div.nav-dropdown link should appear when hovering on a.services a.services:hover div.nav-dropdown { display: block;}.
<div class="main-topnav">
<div class="top-nav-container">
<div class="top-nav">
<a class="main" href="#">الرئيسية</a>
<a class="services hover" href="#">الخدمات</a>
<a class="hover" href="#">احدث الاعمال</a>
<a class="hover" href="#">معرض الاعمال</a>
<a class="hover" href="#">الاخبار و المقالات</a>
<a class="hover" href="#">اتصل بنا</a>
</div>
</div>
<div class="nav-dropdown">
<ul class="dropdown-ul">
<li>انظمة دار السعادة</li>
<li>MY ROOM</li>
<li>I DESIGN</li>
<li>IDEAL HOME</li>
</ul>
</div>
</div>
I think it could help you.
.top-nav {
display: flex;
}
.top-nav-link {
position: relative;
}
.dropdown-ul {
position: absolute;
white-space: nowrap;
list-style-type: none;
padding: 0;
margin: 0;
max-height: 0;
overflow: hidden;
transition: all .5s ease;
}
.services:hover~.dropdown-ul {
max-height: 80px;
}
.dropdown-ul:hover {
max-height: 80px;
}
<div class="main-topnav">
<div class="top-nav-container">
<div class="top-nav">
<div class="top-nav-link"><a class="main" href="#">الرئيسية</a></div>
<div class="top-nav-link">
<a class="services hover" href="#">الخدمات</a>
<ul class="dropdown-ul">
<li>انظمة دار السعادة</li>
<li>MY ROOM</li>
<li>I DESIGN</li>
<li>IDEAL HOME</li>
</ul>
</div>
<div class="top-nav-link"><a class="hover" href="#">احدث الاعمال</a></div>
<div class="top-nav-link"><a class="hover" href="#">معرض الاعمال</a></div>
<div class="top-nav-link"><a class="hover" href="#">الاخبار و المقالات</a></div>
<div class="top-nav-link"><a class="hover" href="#">اتصل بنا</a></div>
</div>
</div>
</div>
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>
I'm having a little trouble with floating my elements. I have some phantom margin that has appeared on my 3rd col element; as seen in the image below;
I have tried adding; box-sizing: border-box; but this doesn't help either. Is there something I am missing?
Code
#f-wrap {
position: relative;
width:100%;
margin: 0 auto;
}
.row {
display: inline-block;
width: 100%;
}
.col {
display: inline-block;
float: left;
width: 45%;
margin: 2em 1em;
background: #f0f;
}
<section class="ctre s-f">
<div id="t-wrap">
<div class="row">
<div class="col">
<img src="img-bin/mgi-logo.png" alt="MGI Technology logo." width="20%"/>
</div>
<div class="col">
<h3 class="f-h">Related Links</h3><br/>
<ul>
<li class="f-lnk">Home</li>
<li class="f-lnk">About us</li>
<li class="f-lnk">Products</li>
<li class="f-lnk">News</li>
<li class="f-lnk">Contact us</li>
<li class="f-lnk">Recycle</li>
<li class="f-lnk">Site map</li>
</ul>
</div>
</div>
<hr class="style-two"/>
<div class="row">
<div class="col">
<h3 class="f-h">Social</h3><br/>
<ul>
<li class="f-ico"><img src="img-bin/mgi-logo.png" alt="" width="100%" /></li>
<li class="f-ico"><img src="img-bin/mgi-logo.png" alt="" width="100%" /></li>
<li class="f-ico"><img src="img-bin/mgi-logo.png" alt="" width="100%" /></li>
</ul>
</div>
<div class="col f-txt">
<h3 class="f-h">Find Us</h3><br/>
MGI Technology<br/>
<br/>
MAP
</div>
</div>
</div>
</section>
Any assistance I can get with this would be greatly appreciated...
Update: Have now tried vertical-align:top; and removed float:left. Issue persists.
Temporary Live Example
your snippet is not showing any issue but anyhow, but it seems that's due to by default inline-block is vertical-align:baseline, so you must set to vertical-align:top
plus remove unnecessary float:left
#f-wrap {
position: relative;
width:100%;
margin: 0 auto;
}
.row {
display: inline-block;
vertical-align:top;
width: 100%;
}
.col {
display: inline-block;
vertical-align:top;
width: 45%;
margin: 2em 1em;
background: #f0f;
}
<section class="ctre s-f">
<div id="t-wrap">
<div class="row">
<div class="col">
<img src="img-bin/mgi-logo.png" alt="MGI Technology logo." width="20%"/>
</div>
<div class="col">
<h3 class="f-h">Related Links</h3><br/>
<ul>
<li class="f-lnk">Home</li>
<li class="f-lnk">About us</li>
<li class="f-lnk">Products</li>
<li class="f-lnk">News</li>
<li class="f-lnk">Contact us</li>
<li class="f-lnk">Recycle</li>
<li class="f-lnk">Site map</li>
</ul>
</div>
</div>
<hr class="style-two"/>
<div class="row">
<div class="col">
<h3 class="f-h">Social</h3><br/>
<ul>
<li class="f-ico"><img src="img-bin/mgi-logo.png" alt="" width="100%" /></li>
<li class="f-ico"><img src="img-bin/mgi-logo.png" alt="" width="100%" /></li>
<li class="f-ico"><img src="img-bin/mgi-logo.png" alt="" width="100%" /></li>
</ul>
</div>
<div class="col f-txt">
<h3 class="f-h">Find Us</h3><br/>
MGI Technology<br/>
<br/>
MAP
</div>
</div>
</div>
</section>
UPDATE:
Looking at your live site, the issue is that the other col has another class f-txt which has a property font-size:8pt and with that, change the height of the column.
So either you apply the same class to the first .col or remove that property
I'm trying to code a Nav bar for my site but as soon as I implemented css imgBox my links stopped working. The're in the same directory so I don't believe this is the problem but for the life of me I can't figure out what's wrong
here's the HTML code
<ul id="menu">
<li> <div class="imgBox" id="img1"> </div> </li>
<li> <div class="imgBox" id="img2"> </div> </li>
<li> <div class="imgBox" id="img3"> </div> </li>
</ul>
and here's the css
.imgBox
{
float:left;
border: 1px solid #9325BC;
}
#img1
{
background: url(images/home.png) no-repeat;
width: 129px;
height: 50px;
}
#img2
{
background: url(images/media.png) no-repeat;
width: 112px;
height: 50px;
}
.imgBox:hover
{
-moz-box-shadow: 0 0 30px #0000cc;
-webkit-box-shadow: 0 0 30px #0000cc;
box-shadow: 0 0 30px #0000cc;
}
Any help will be greatly appreciated
You must close all tags you open. link tags and div tags. Also if you want your link to be visible it must contain at least a word or image.
<ul id="menu">
<li><div class="imgBox" id="img1"> Index </div> </li>
<li> <div class="imgBox" id="img2"> Media </div></li>
<li> <div class="imgBox" id="img3"> Social media</div></li>
</ul>
<ul id="menu">
<li> <div class="imgBox" id="img1"> </div> </li>
<li> <div class="imgBox" id="img2"> </li>
<li> <div class="imgBox" id="img3"> </li>
</ul>
Is this what you're trying to do?
Working version of your question can be found here: JSFIDDLE
<li> <div class="imgBox" id="img1"> Some Text here </div> </li>
The problem was that you did not close your href element
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!