Bootstrap Navbar - Extra Spaces? - text

I have a Bootstrap Footer that I'm making, and I'm putting images in it as icons, and also text - all as < li >s.
Where there are images - there is no space at the bottom.
Where there's text - there is. Why is that? I don't want that.
Check it out here on JSFiddle:
It's the first time I've posted a JSFiddle link here, so if you mind explaining me why StackOverflow required me to use code with the link, it'd help me with future questions.

You could simply add padding-top: 5px; to your li with text like this:
<li style="border:1px solid blue; padding-top: 5px;">logo</li>

Related

Speed insights not updating after changes

i updated my website to new picture webp format instead of pngs.
It appears that google insights still is working on previous code, not considering the changes that have been done.
the project is here : https://www.marche-talensac.fr/
If you can see anything wrong, i thank you to have a word in here :)
Regards to you all ^^
The problem is that you are still serving the old image as well as the new image. You will see that your slider is adding the image as a background image via an inline style attribute.
<picture>
<source type="image/webp" srcset="https://www.marche-talensac.fr/css/home2.webp">
<source type="image/png" srcset="https://www.marche-talensac.fr/css/home2.png">
<img src="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" style="width: 650px; height: 500px; background-image: url("https://www.marche-talensac.fr/css/home2.png");" class="homepng">
</picture>
If you remove whatever is causing that style to be added to your slide it should work as intended.
For clarity remove the code that injects style="width: 650px; height: 500px; background-image: url("https://www.marche-talensac.fr/css/home2.png");"
Also note that you have only updated the home page slider, all the other images are still served as .jpg files.

Create text boxes that change colour when hovered over

I am trying to create text-box hyperlinks for my website. I want transparent boxes until hovered over then i want to box to change colour but not the text. i was wondering if their was a way to do this?
Using CSS you'll want to add background-color: yourcolor to the hover pseudo class.
Here's an example for you:
<!-- Here's the HTML -->
<div class="myDiv">
<p>Here is some text and then you will be linking to another site</p>
</div>
Then in your CSS you'll have:
.myDiv a:hover {
background-color: red;
}
Pretty Simple.

CSS parent height in percentage for absolute positioned children in responsive web design

I'am actually working on a responsive design and i'm quite stuck:
I need to set image-type children position to absolute in their div parent, and keep the lower section under this parent. But actually, the only solution i have is to set a fixed height for this parent (in that case, a relative margin for the lower section wouldn't work in a dynamic structure). The problem is that the images, set to max-width: 100%; to keep their dimensions flexible, expand with the page, and the lower section is no more well positioned on resize:
<div id='page'>
<div id='b0'><img /><img /></div>
<section id='s0'><h2>section title</h2><p>hjkhjkhjk</p></section>
</div>
And the CSS:
#page{max-width:1024px; margin: 0 auto;}
#b0{position: relative; height:25%;}/* doesn't work, 100px instead work but responsive design fails */
#b0 img{position: absolute;}
Does anyone have a solution for that ?
Thank's in advance
Simplier solution :
Consists in setting each image to position: absolute; except the last one :
#b0 img:last-child{position: relative;
keeping an element in the "flood" provides its parent the needed height value.
Ok, I now have a very simple mixed solution using Both CSS and Javascript:
As the primary need is "mobile first" design, i've introduced un min-height for the images container in a smartphoine targeted media query css file:
In the head tag:
<link rel='stylesheet' media='screen and (min-width:320px)' type='text/css' href='css/css.css' />
Then the CSS:
#b0{position: relative; min-height:82px;}
And a little bit of Javascript:
$(document).ready(function(){window.onresize=function(){$('#b0').css({'height' :( this.innerWidth * .25)+'px'})}});
So this mixed solution needs Javascript activated, a min-height to be set up for each media query step, and a percentage for the container height calculated with global and maximum page dimensions: in my case:
#page{max-width: 1024px;}
and a container height at about 280px;
Hope this can help someone someday ;-)

Best practices when building JSF applications that produce elegant user experiences

I'm using PrimaFaces with Mojarra implementation for my JSF applications. When I put together the application I use company/app logos and the primefaces widgets (the widgets themselves look great!) which have the jQuery look and feel. The issue is that the applications end up looking very similar with a somewhat box type appearance - text boxes, datatables etc., The look and feel is nowhere compared to a handcoded by a html/css designer/developer.
When you develop enterprise JSF applications what are some of the best practices you use to ensure a user-friendly good looking ui?
I'm not exactly sure what you are looking for but there is a tradeoff between speed of development and appearance. That said, in our shop we use PrimeFaces and have developers who make the page "work". They are then followed on by xhtml/css designers who clean up the appearance of the page and controls. If you haven't already, check out the styling section. There is quite a bit of flexibility in changing the appearance of controls. Of course they are still layered, pre-defined controls.
Edit: You can style individual parts of your controls using css. So for example here we change the appearance of the title bar:
.bottomViewItem .ui-panel-titlebar{
background: none;
border: none;
box-shadow: none;
padding: 5px;
margin: 0.1em 16px 0.2em 0;
}
And here we change the title appearance:
.bottomViewItem .ui-panel-titlebar span.ui-panel-title{
color: #E27C4C !important;
font-family: Rockwell, Georgia, Arial !important;
font-size: 18px !important;
margin: 0.1em 16px 0.2em 0;
text-shadow: none;
}

Dreamweaver CS6 Error?

I have a page in DW that has a black background. In Design View of the page the page shows as white instead of black. I am not sure why this is. I can add inline styles to the entire page as follows to get the page black:
<body>
<div style="background-color:#000" class="wrap_fullwidth">
<div style="background-color:#000" class="center">
<div style="background-color:#000" class="img-center">
<img src="image.jpg" alt="Image" />
</div>
<p style="background-color:#000"> </p>
</div>
</div>
</div>
</body>
Here is the CSS for the page and the way it normally is:
html, body{
font-size:16px;
font-family:"Lucida Grande", Helvetica, Arial, sans-serif;
line-height:23px;
color:#f3f3f3;
background:#000;
}
.wrap_fullwidth {width:100%; position:relative; float:left;
clear:both; padding-top:20px; }
.center{width:940px; position:relative; margin:0 auto;
clear:both; padding:0px 10px; display:block;}
p{ margin-bottom:20px; text-align:justify;}
.img-center{ text-align: center; }
The design view should show the page as it appears with css etc. I do not understand why the white is showing when the css clearly shows black as a background. The good thing is the page in the browser shows correctly but this makes things a pain if I work in Design View. (Which I do use)
Ideas or thoughts as to how to fix this?
Note: CS5 and CS5.5 did not have this behavior. Only CS6.
It turned out that my Reset for the CSS was causing DW to show a transparent background (thus white) instead of black.
The reset contained this property: background:transparent;
Once I removed that from the reset all worked fine.
Update: I had wondered if the way DW CS6 was reading the CSS if there was a bug or not, after filing a bug report I received this reply:
I was able to reproduce as per your steps and have logged a backlog item for the same. It will be fixed in future release.

Resources