Changing Container Height - height

I am going through some minor issues here. I am using a standard container height and css code for all pages. For most pages there is enough content to fill it and for some the content may only take 10-20% of the page. So is it a good idea for those pages to use a different min-height? Below is the code:
#wrapper {
background-color: #999999;
margin:0 auto;
min-height: 600px;
width:770px;
font-family: "Lucida Grande", Verdana, "Lucida Sans Unicode", Arial, Helvetica,
sans-serif;
font-size:15px;
color: #222222;
margin-left:60px;
margin-bottom:60px;
}

It might be better to declare the lesser min-height in a separate class.
Then, you could do <div id="wrapper" class="smallerContent">.
#wrapper.smallerContent {
min-height: 300px
}

Related

Code from online cookie popup tutorial not setting cookie

I am trying to set up a cookie policy pop-up on site.
I followed an online tutorial to the letter (I thought) but it doesn't work.
The banner shows up as expected, but on clicking accept, the page seems to refresh but no cookie is set and the banner is still there.
I have looked through the tutorial and all seems to be as he typed. Maybe someone could suggest what could be wrong.
The styles were placed in the css file, but I think the issue must be with the php. I have looked for alternative codes but they are so different I am not sure they would work with this method.
I wonder whether it has something to do with the isset commands.
Also, is there a way to ensure that when the cookie is set and is acknowledged that you stay on the same page rather than going to the root directory?
This is on the top of the html code i.e. before doctype
if (isset($_GET['accept-cookies'])) {
setcookie('accept-cookies', 'true', time() + 31557600);
header('Location: ./');
}
?>
This is the section with the banner (I like the way it looks so prefer not to change the style codes)
if (!isset($_COOKIE['accept-cookies'])) {
?>
<div class="cookie-banner">
<div class="cookie-container">
<p style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-style: normal; font-weight: 500; font-size: medium;">We use cookies to track usage and preferences. By using this website we will assume that you consent to their use as per our <u>Privacy and Cookie Policy</u>.</p>
<p style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-style: normal; font-weight: 600; font-size: medium;">Okay</p>
</div>
</div>
<?php
}
?>
Just in case you need it, here are the css parts
background-color: #abd1ff;
padding: 5px 10px;
border-radius: 5px;
display: inline-block;
border: 2px solid #4a6894;
border-bottom: 2px solid #4a6894;
}
.cookie-banner {
background: #6c9bd3;
position: fixed;
top: 0;
left: 0;
width: 98%;
}
.cookie-banner .cookie-container {
margin: 0 auto;
width: 70%;
padding-bottom: 10px;
color: #1f2b3a;
padding: 15px;
}
I was going to add a slide down function, but when I added for it not to display initially in the css code, the banner disappeared even when the js file was referred to with the slide down code.
Any help on what I could add to make it work, what is missing, would be great.
THANK YOU!!!!
No error messages have been seen. Banner just won't disappear and cookie is not set.

Oracle Apex When Sub region overflow Horizontal Scroll Bar add in Parent Region

Need a solution when child region classic report overflow Parent region horizontal Scroll bar add.
If I understood you correctly, you want to add a horizontal scrollbar into the Classic report region. If that's so, two options I know (adjust values so that they fit your report; these are just examples):
Put this into region header:
<div style="border: 1px solid black; width: 500px; height: 300px; overflow: auto">
Region footer:
</div>
Another option: put this into the HTML header:
<style type="text/css">
<!--
div.scroll
{
height: 300px;
width: 500px;
overflow: auto;
border: 1px solid #666;
background-color: #CCC;
padding: 8px;
}
-->
</style>
Region header:
<div class="scroll">
Region footer:
</div>

MailChimp preview overrides link styles

I've run across a problem when creating a custom template for MailChimp - when editing links inside the emails content MailChimp overrides their styles. Here's a part of the template,
<a mc:edit="cta_link" target="_blank" href="*|CUSTOM_URL|*" style="font-family: 'Helvetica', 'Arial', sans-serif !important; font-size: 11px; color: #000000 !important; border-bottom: 1px solid #000000 !important; text-transform: uppercase !important; padding-bottom: 1px;">Read more</a>
As you can see I've also added !important rules to some of the styles to try and avoid any overrides but with no effect. I've switched between having a static example href src and the MailChimp custom url variable, doesn't seem to make any difference.
After updating the link the font changes to a default Times typeface.
Anything I'm missing?
4 years later and it's still happening.
The styles you apply to a link element are overridden by the global link styles.
My solution: insert a span tag inside the link.
<a mc:edit="cta_link" target="_blank" href="*|CUSTOM_URL|*"><span style="font-family: 'Helvetica', 'Arial', sans-serif !important; font-size: 11px; color: #000000 !important; border-bottom: 1px solid #000000 !important; text-transform: uppercase !important; padding-bottom: 1px;">Read more</a>

Navigation Menu: Using a single centered image w/ 2 menu links on either side

Ok, I'm trying to tinker with my navigation menu. I want something like this website:
http://aleksfaure.com/
He has a single image (logo) centered with 2 menu links on either side. I've tried a couple of different things, including just using my logo as an image centered at the top, in between the menu. No dice.
Here's the relevant HTML and CSS I have with my current nav menu. I'm still kind of a intermediate beginner at this.
HTML
<nav role="navigation">
<ul id="nav">
<li>Home</li>
<li>About Me</li>
<ul id="nav-right" style="float:right;">
<li>Portfolio</li>
<li>Contact</li> </ul>
</ul></nav>
CSS
#header nav {
position: relative;
width: 700px;
height: 163px;
display: block;
margin: 0 auto;
text-align: center;
}
#header nav ul li {
float: left; list-style: none;
}
ul#nav li a {
display: block;
width: 100px;
height: 100px;
padding: 50px 0 0 0;
margin: 0 10px 0 10px;
font-family: 'MuseoSlab-500', Helvetica, sans-serif;
font-size: 16px;
text-transform: uppercase;
color: #000;
text-shadow: 0 2px 1px #bbbaba;
text-decoration: none;
}
ul#nav li a.mainnav:hover {
color: #13cad1;
text-shadow: 0 2px 1px #fff;
}
You don't need to use two separate lists. Treat the entire menu, including your image, as one list. Consider something like this for your HTML:
<div>
<ul id="nav">
<li>Home</li>
<li>About Me</li>
<li><img src="images/yourLogo.png"></li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div>
And make sure you have your style set to float: left;
#nav li { float: left; list-style: none;}
Then, just center the entire div on the page, and style your links as you want.
SEPARATE NOTES:
In your code, you are missing the closing tag for your first unordered list.
The navigation element is not very widely supported, so depending on your audience you may want to use a div.

CSS - Height: 100% vs min-height: 100%;

So in my code I have a sticky footer. And the sticky footer has the #wrap container with a min-height of 100%. But with min-height you can't use height:100% on objects inside the wrap div.
So I add height:100% but it messes with the layout by making the footer roll over the content in the wrap div when window height is too small.
Anyone have fixes for this?
<div id="wrap">
<div id="main">
<div id="content">
</div>
</div>
<div class="clearfooter"></div>
</div>
<div id="footer">
</div>
CSS:
*{
padding: 0px;
margin: 0px;
}
html, body {
height: 100%;
}
body{
color: #FFF;
background-image:url('../images/black_denim.png');
}
#wrap {
min-height: 100%;
margin-bottom: -200px;
position: relative;
}
#topBanner{
width: 200px;
margin: 0px auto;
}
.clearfooter {
height: 200px;
clear: both;
}
/* footer */
#footer {
position: relative;
height: 200px;
width: 100%;
min-width: 960px;
}
If all you need is a sticky footer that doesn't cover up any of the body's content then just give the footer a fixed position and give the bottom of the body padding equal to the footers height.
body{
padding-bottom:200px;
}
#footer {
position: fixed;
bottom:0;
height: 200px;
width: 100%;
}
EDIT:
if your concern is that on very small screens the fixed footer covers up most of the screen then there is no workaround for this except for maybe hiding the footer dynamically using css media queries or javascript.
many mobile browsers do not support fixed positions precisely because of the issue of them covering large portions of the screen.