I created a drop-down menu on my website with social media buttons. It works great for all of them except Google+, which for some reason, when the page loads, the menu acts as if I am hovering over it by default.
For example, when the page loads, I want it to look like this:
And when I hover over, say, Facebook, it should look like this:
The second part works, but at the moment, when the page finishes loading, it looks like this:
The code for the menu is below, and my website is http://www.rmartinez.co/ Thank you!
<table style="margin-top:12px;margin-bottom:13px;margin-left: -5px;margin-right: auto;">
<tr>
<td>
<ul id="nav" class="drop">
<li><a href="https://www.facebook.com/rmartinez93" target="_blank"><img alt="FB" border="0" height="60" width="60" src="http://i920.photobucket.com/albums/ad44/rubenrox1029/fb_zps6347bf28.png"
onmouseover="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/fb2_zpsd4175471.png'" onmouseout="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/fb_zps6347bf28.png'"/></a>
<ul>
<li><div style="width:100px;vertical-align:top;*display:inline;"><div class="fb-like" data-href="http://www.rmartinez.co" data-send="false" data-layout="button_count" data-show-faces="false" data-font="segoe ui" data-colorscheme="dark"></div></div>
</li>
</ul>
</li>
</ul>
</td>
<td>
<ul id="nav" class="drop">
<li><a href="http://www.twitter.com/staticint" target="_blank"><img alt="Twitter" border="0" height="60" width="60" src="http://i920.photobucket.com/albums/ad44/rubenrox1029/twitter_zps866fb15d.png"
onmouseover="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/twitter2_zps2413b3a8.png'" onmouseout="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/twitter_zps866fb15d.png'"/></a>
<ul>
<li><div style="width:100px;vertical-align:top;*display:inline;">Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>
</li>
</ul>
</li>
</ul>
</td>
<td>
<ul id="nav" class="drop">
<li><a href="https://plus.google.com/u/0/108135165162255920411/posts" target="_blank"><img height="60" width="60" alt="G+" border="0" src="http://i920.photobucket.com/albums/ad44/rubenrox1029/g_zps68bc2093.png"
onmouseover="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/g2_zps4c82af5d.png'" onmouseout="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/g_zps68bc2093.png'"/></a>
<ul>
<li>
<div style="width:100px;vertical-align:top;*display:inline;"><div class="g-plusone" data-annotation="none" data-width="300" data-href="http://www.rmartinez.co" ></div></div>
</li>
</ul>
</li>
</ul>
</td>
<td>
<ul id="nav" class="drop">
<li><a href="http://www.linkedin.com/in/rmartinez93/" target="_blank"><img height="60" width="60" alt="LinkedIn" border="0" src="http://i920.photobucket.com/albums/ad44/rubenrox1029/in_zps0ded6f9d.png"
onmouseover="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/in2_zps53277e88.png'" onmouseout="this.src='http://i920.photobucket.com/albums/ad44/rubenrox1029/in_zps0ded6f9d.png'"/></a>
<ul>
<li><div style="width:100px;vertical-align:top;*display:inline;"><script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share" data-url="http://www.rmartinez.co"></script>
</div>
</li>
</ul>
</li>
</ul>
</td>
</tr>
</table>
On line 490 in your CSS, change
ul.drop ul {
visibility:hidden; <!-- this needs to be changed
//your other stuff
}
to
ul.drop ul {
display:none;
}
And add the line
ul.drop:hover ul {
display:block;
}
Related
<ul type="disc">
<li> Himalayan/Indian Black Bear <br>
<Img Src="http://www.shunya.net/Pictures/Himalayas/Darjeeling/HimalayanBear03.jpg" height="30%" width="30%">
</LI>
<li> Red Panda <br>
<img Src="https://www.thoughtco.com/thmb/s-sGgR7zQSq2tZlZMlD7uuY81Gk=/7360x4912/filters:fill(auto,1)/happy-red-panda-171399380-5b574325c9e77c005b690b41.jpg" height="30%" width="30%">
</LI>
<li> Himalayan Yak <br>
<img Src="http://www.silvertineranch.ca/uploads/5/9/4/9/5949047/1804496_3_orig.jpg" height="30%" width="30%">
</LI>
<li> Giant-panda <br>
<img Src="http://www.xinhuanet.com/english/2019-12/06/138611350_15756361946211n.jpg" height="30%" width="30%">
</LI>
<li> Himalayan Marmot <br>
<img Src="https://news.cgtn.com/news/3d3d514d7755444f31457a6333566d54/img/5bcc73138da34ec987d434f94e473892/5bcc73138da34ec987d434f94e473892.jpg" height="30%" width="30%">
</LI>
</ul>
here is the ss of the output
Please try to explain your problem next time to let the other help you more.
Try this code maybe it's what you want, just adjust width / height of image and also li:
li {
display:block;
float:left;
width:200px; /* adjust */
padding: 5px; /*adjust*/
}
<ul type="disc">
<li><Img Src="http://www.shunya.net/Pictures/Himalayas/Darjeeling/HimalayanBear03.jpg" height="30%" width="30%"> <br> Himalayan/Indian Black Bear
</li>
<li><img Src="https://www.thoughtco.com/thmb/s-sGgR7zQSq2tZlZMlD7uuY81Gk=/7360x4912/filters:fill(auto,1)/happy-red-panda-171399380-5b574325c9e77c005b690b41.jpg" height="30%" width="30%"> <br> Red Panda
</li>
<li> <img Src="http://www.silvertineranch.ca/uploads/5/9/4/9/5949047/1804496_3_orig.jpg" height="30%" width="30%"><br>Himalayan Yak
</li>
<li> <img Src="http://www.xinhuanet.com/english/2019-12/06/138611350_15756361946211n.jpg" height="30%" width="30%"><br> Giant-panda
</li>
<li> <img Src="https://news.cgtn.com/news/3d3d514d7755444f31457a6333566d54/img/5bcc73138da34ec987d434f94e473892/5bcc73138da34ec987d434f94e473892.jpg" height="30%" width="30%"><br>Himalayan Marmot
</li>
</ul>
I tried to make a footer for a Website im doing for shool. I want to have something like the Impressum on the right and little images for social media on the left. I made it work for the right side but I dont know why the images arent on the right side. I already googled but the things they said didnt worked for me.
JSfiddle demo :
<ul>
<li><a>Irgendwas</a>
</li>
<li><a>Impressum</a>
</li>
<li><a><address>Erstellt von</address></a>
</li>
</ul>
<ul id="socialmediaicons">
<li><a><img src="bilder/icons/facebook.svg" width="30" height="30"></img></a>
</li>
<li><a><img src="bilder/icons/google+-with-circle.svg" width="30" height="30"></img></a>
</li>
</ul>
My suggestion is to just place them outside the footer but I need to have them in there.
If you want the pictures on the left as you mentioned first, add a class to the list items for the socialmedia icons and give it a display: inline-block that should do what you need. If you want them on the right they are there.
.leftFoot {
display: inline-block;
}
<footer id="footer-wrapper">
<ul>
<li><a>Irgendwas</a>
</li>
<li><a>Impressum</a>
</li>
<li><a><address>Erstellt von</address></a>
</li>
</ul>
<ul id="socialmediaicons">
<li class="leftFoot"><a><img src="bilder/icons/facebook.svg" width="30" height="30"></img></a>
</li>
<li class="leftFoot"><a><img src="bilder/icons/google+-with-circle.svg" width="30" height="30"></img></a>
</li>
</ul>
</footer>
You have to put the elements in reverse order when floating "right" things :
demo
<ul id="socialmediaicons">
<li><a><img src="bilder/icons/facebook.svg" width="30" height="30"></img></a>
</li>
<li><a><img src="bilder/icons/google+-with-circle.svg" width="30" height="30"></img></a>
</li>
</ul>
<ul>
<li><a>Irgendwas</a>
</li>
<li><a>Impressum</a>
</li>
<li><a><address>Erstellt von</address></a>
</li>
</ul>
Hi Im making a theme for my website which has a user menu in the top right corner of the page. This is inside a purple bar which also holds the title of the page. I have managed to get the user menu on the right hand side but I'm unable to get it into the top bar, it just sits bellow the bar. To see exactly what I mean here's a link to my site http://cpanel.gaigo.org
I believe it has something to do with the header div spreading accross the whole page but im unable to get it to shrink down to only fill 250px.
The HTML code is bellow:
<div id="headerWrap" style="position:fixed;width:100%; height:59px;z-index:1;background-color:#494158;">
<div id="header" style="width:250px;">
<h1 style="margin-bottom:0; margin-left:20px; color:#fff;" id="Title">GaiGO CPanel</h1>
</div>
<div id="userMenuButton" style="float:right;margin-right:10px;width:auto;">
<span style="color:#fff;">Hi, Riley Evans</span>
<img src="user.png" height="30" width="30"/>
</div>
</div>
Thanks for any responses in advance I'm sure they will help me figure this out.
You just try this code inside your body tag.I maked some changes inside your inline css in header,userbutton div id's
<div id="container">
<div id="headerWrap" style="position:fixed;width:100%; height:59px;z-index:1;background-color:#494158;">
<div id="header" style="width:250px;float:left">
<h1 style="margin-bottom:0; margin-left:20px; color:#fff;" id="Title">GaiGO CPanel</h1>
</div>
<div id="userMenuButton" style="float:right;margin-right:10px;width:auto;margin-top:25px;">
<span style="color:#fff;">Hi, Riley Evans</span>
<img src="user.png" height="30" width="30">
</div>
</div>
<div id="menuWrap" style="position:fixed; height:100%; z-index:0;">
<div id="menuHolder" style="background-color:#77bb66;height:inherit;width:50px;float:left;margin-top:21px;position:relative;">
<table class="menu" style="margin:0 auto; margin-top:38px;">
<tbody>
<tr>
<td class="sideMenuOption" id="dashboardButton" onclick="menuSlider('dashboardSubMenu')">
<img src="/style/images/designer-icons/Home-48.png" width="40" height="40">
</td>
</tr>
<tr>
<td class="sideMenuOption" id="pagesButton" onclick="menuSlider('pagesSubMenu')">
<img src="/style/images/designer-icons/Multi-Page-48.png" width="40" height="40">
</td>
</tr>
<tr>
<td class="sideMenuOption" id="mediaButton" onclick="menuSlider('mediaSubMenu')">
<img src="/style/images/designer-icons/Picture-48.png" width="40" height="40">
</td>
</tr>
<tr>
<td class="sideMenuOption" id="stylesButton" onclick="menuSlider('stylesSubMenu')">
<img src="/style/images/designer-icons/Brush-01-48.png" width="40" height="40">
</td>
</tr>
<tr>
<td class="sideMenuOption" id="settingsButton" onclick="menuSlider('settingsSubMenu')">
<img src="/style/images/designer-icons/Settings-02-48.png" width="40" height="40">
</td>
</tr>
</tbody>
</table>
</div>
<div id="subMenuHolder" class="hide">
<ul class="subMenu dashboardSubMenu" id="dashboardSubMenu">
<li>Home</li>
<li>My Site</li>
<li>Stats</li>
</ul>
<ul class="subMenu pagesSubMenu" id="pagesSubMenu">
<li>Pages</li>
<li>New page</li>
</ul>
<ul class="subMenu mediaSubMenu" id="mediaSubMenu">
<li>Library</li>
<li>Upload</li>
</ul>
<ul class="subMenu stylesSubMenu" id="stylesSubMenu">
<li>Themes</li>
<li>Customise</li>
<li>Menus</li>
<li>Mobile</li>
</ul>
<ul class="subMenu settingsSubMenu" id="settingsSubMenu">
<li>General</li>
<li>Site</li>
<li>Account</li>
</ul>
<div id="closeSubMenuButton" onclick="subMenuClose()">
<img src="/style/images/designer-icons/Arrowhead-Left-01-48.png" height="30" width="30">
</div>
</div>
</div>
<div id="contentWrap" style="width:100%;height:2000px;">
<div id="content" style="background-color:#EEEEEE;float:left;width:100%;height:2000px;margin-top:59px;margin-left:0px;">
<div id="contentHolder" style="margin-left:50px;">Content goes here</div>
</div>
</div>
</div>
The div element automatically is given the display:block property/value. Try display:inline-block. Some additional tweaks may be necessary but this should get you on your way. You may also consider wrapping the code with span elements instead of div elements.
So I got this header, I want the logo in the middle, and then 2 links on the left and 2 links on the right. I guess I know how to do this but not what the best way is. Got what I think that works below. Edit: Obviously no css applied yet, gotta get the html straight first.
So here's the header
<header>
<div id="head-wrap">
<nav>
<ul>
<li>Smartphones</li>
<li>Tablets</li>
<li>Laptops</li>
<li>Desktops</li>
</ul>
</nav>
</div>
</header>
What might work
<header>
<div id="head-wrap">
<nav>
<div id="nav-left>
<ul>
<li>Smartphones</li>
<li>Tablets</li>
</ul>
</div>
<img src="logo.png" alt="Logo" height="42" width="42">
<div id="nav-right">
<ul>
<li>Laptops</li>
<li>Desktops</li>
</ul>
</div>
</nav>
</div>
</header>
Is this the best way or should I do it differently?
Regards
Your example has a lot of superfluous HTML elements in it. Instead of multiple div containers, try something like this:
<nav>
<ul>
<li>
Smartphones
</li>
<li>
Tablets
</li>
<li>
<img src="logo.png" alt="Logo" height="42" width="42" />
</li>
<li>
Laptops
</li>
<li>
Desktops
</li>
</ul>
</nav>
Then display the li elements inline:
li{
display:inline;
}
Example
Obviously you'll need to edit this more to fit your own needs, but a simple structure is the start of a good design.
I would like to create a joomla template from the following HTML. I am using joomla version 3.2.0.
Here is the HTML code:
The divider "background" and "background2" are backgrounds that drop down along with the menu, the whole drop-down menu was created entirely with css.
<body>
<div id="container">
<div id="header">
<img alt="header" src="header english.jpg" width="723" height="252"
usemap="#Deutsch" border="0" />
<map name="Deutsch">
<area shape="rect" coords="605,16,716,52" href="index_de.html"
title="Deutsch" alt="Deutsch" />
</map>
<div id="menu">
<ul id="navmenu">
<li>Home</li>
<li>Information
<div id="background">
</div>
<br />
<ul class="sub1">
<li><a class="width-exception" href="link1.html">Link 1</a>
<ul class="sub2">
<li><a class="width-exception2" href="link1-1.html">Link 1.1</a></li>
<li><a class="width-exception2" href="link1-2.html">Link 1.2</a></li>
<li><a class="width-exception2" href="link1-3.html">Link 1.3</a></li>
<li><a class="width-exception2" href="link1-4.html">Link 1.4</a></li>
<li><a class="width-exception2" href="link1-5.html">Link 1.5</a></li>
</ul>
</li>
<li><a class="width-exception"
href="link2.html">Link 2</a></li>
<li><a class="width-exception" href="link3.html">Link 3</a></li>
<li><a class="width-exception" href="link4.html">Link 4</a>
<ul class="sub3">
<li><a class="width-exception" href="link4-1.html">Link4.1</a></li>
<li><a class="width-exception" href="link4-2.html">Link4.2</a></li>
</ul>
</li>
</ul>
</li>
<li>Blog</li>
<li>About
<div id="background2">
</div>
<ul class="sub4">
<li><br />
</li>
<li>Link 5</li>
<li>Link 6</li>
</ul>
</li>
<li>Contact</li>
</ul>
</div>
<div id="body">
<h1>Title</h1>
<br></br>
<p >This page is under construction, please come back later!</p>
</div>
<div id="footer">
<img alt="footer" src="footer english.jpg" width="723" height="220"
usemap="#footer menu" border="0" />
<map name="footer menu">
<area shape="rect" coords="205,173,288,196" href="privacy%20policy.html"
title="Privacy policy" alt="Privacy policy" />
<area shape="rect" coords="325,173,449,196" href="terms%20&%20conditions.html"
title="Terms & conditions" alt="Terms & conditions" />
<area shape="rect" coords="468,174,527,196" href="contact.html"
title="Contact" alt="Contact" />
</map>
</div>
</div>
</div>
</body>
</html>
I have left out the header and doctype since I already have that sorted.
The image map in the header div needs to be a image map, the other image maps in the footer div do not necessarily need to be image maps.
The basic structure of the page should be as follows:
Header image (with image map).
Menu (it should be on top of the image, I guess I can do this with the help of my xml and css files?!).
The main body where all my text will be, (body div).
The footer where I want to have the footer image. so far what I have done is included the text in the image and the created a image map. I am happy to use just text if that makes it any easier or uses up less space.
The other big question I have is what the xml map needs to look like for the above menu?
I have the images saved in a separate folder, do I just need to list the folder in the part, or do I need to list every image? Same question for the css file, I saved it in a separate folder, do I still need to list it in the xml file?
I have figured out how to do the rest of the files part so no need to explain that.
I am not sure about the positions part though. I would think I need four or five positions (depending on whether there is a image map in the footer or not).
The first one being the header, the second the menu, in third place the body and last (or second to last) the footer. What do I need to name these? Can I just name them "menu" and "footer" or does the name need to be the position they are in?