Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Custom navigation Bar and DIV

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Custom navigation Bar and DIV

Post by pacificblue03 »

so i have created a custom navigation bar and with hover using css

test pasted the code onto my index page the Buttons are there but they look like this:

Image

tested through dreamwever (f12)

Image

if anyone thinks my directory of the images in the css is wrong i dont think it is here is the folder structure

Image

i have uploaded my page containing the code and my css for examination

Antonio.
You do not have the required permissions to view the files attached to this post.
Synewave
Posts: 642
Joined: Mon 25 Jan 2010 1:55 pm
Weather Station: Watson W-8681
Operating System: Raspian
Location: Brighton, UK
Contact:

Re: Custom navigation Bar and DIV

Post by Synewave »

Have you uploaded the contents of the buttons folder to your website? I've just checked and it doesn't look like it.
pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Re: Custom navigation Bar and DIV

Post by pacificblue03 »

no i haven't because img src is not from a website but from the buttons folder as above if i do need to put them on my site where would i?

Antonio.
pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Re: Custom navigation Bar and DIV

Post by pacificblue03 »

YOU are a god it worked but i have a glitch

please check my index page you will see that when you mouse over for a intermittent second the button dissapears.

Antonio.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Custom navigation Bar and DIV

Post by mcrossley »

I think that is the delay while the browser downloads the mouse-over image for the first time. You could pre-cache the image to avoid this.
pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Re: Custom navigation Bar and DIV

Post by pacificblue03 »

ok would you be so kind and tell me how i can pre cashe?

will this stop it from happening for all users?

Antonio.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Custom navigation Bar and DIV

Post by mcrossley »

Sorry Antonio, there are a number of ways of doing it, either via HTML, JavaScript or CSS.

Here is one method: http://www.yourhtmlsource.com/images/preloading.html

Google "HTML pre-load images" for lots more.
pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Re: Custom navigation Bar and DIV

Post by pacificblue03 »

Ok i will give this a wirl now

be back soon

Antonio.
pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Re: Custom navigation Bar and DIV

Post by pacificblue03 »

So before i post now would this be my code?

___________________________________________________

<script type="text/javascript">
<!-- hide from non JavaScript Browsers

Image1= new Image(139,41)
Image1.src = "buttons/homenormal.png"

Image2 = new Image(139,41)
Image2.src = "buttons/homehover.png"

Image3 = new Image(139,41)
Image3.src = "buttons/todaynormal.png"

Image3 = new Image(139,41)
Image3.src = "buttons/todayhover.png"

Image3 = new Image(139,41)
Image3.src = "buttons/yesterdaynormal.png"

Image3 = new Image(139,41)
Image3.src = "buttons/yesterdayhover"

Image3 = new Image(139,41)
Image3.src = "buttons/gaugesnormal.png"

Image3 = new Image(139,41)
Image3.src = "buttons/gaugeshover.png"

Image3 = new Image(139,41)
Image3.src = "buttons/livedatanormal.png"

Image3 = new Image(139,41)
Image3.src = "livedatahover.png"

Image3 = new Image(139,41)
Image3.src = "buttons/recordsnormal.png"

Image3 = new Image(139,41)
Image3.src = "buttons/recordshover.png"

Image3 = new Image(139,41)
Image3.src = "buttons/graphsnormal.png"

Image3 = new Image(139,41)
Image3.src = "buttons/graphshover.png"

Image3 = new Image(10,10)
Image3.src = "buttons/invisible.png"

// End Hiding -->
</script>

________________________________________________________

Antonio.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Custom navigation Bar and DIV

Post by mcrossley »

I think you only need to do the 'hover' images, the normal images will be downloaded as part of the page anyway.
pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Re: Custom navigation Bar and DIV

Post by pacificblue03 »

EDIT: yess it works :clap:

Can i have feedback please and is there another way of doing the hover effect in css then how i did it?
You do not have the required permissions to view the files attached to this post.
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Custom navigation Bar and DIV

Post by daj »

pacificblue03 wrote:Can i have feedback please
I assume you will incorporate the tabs into each page? That being the case you should look to highlight the page the users is on. So for example, if you are on the Home page, the Home tab is always highlighted.
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
pacificblue03
Posts: 425
Joined: Sun 13 Jun 2010 12:35 am
Weather Station: Davis vantage vue
Operating System: windows 11
Location: Sydney Australia

Re: Custom navigation Bar and DIV

Post by pacificblue03 »

Daj i am allpying the code right now to my other pages i will be done in 10 minutes by the way what do you mean by highlighted?

Antonio.
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Custom navigation Bar and DIV

Post by daj »

pacificblue03 wrote:by the way what do you mean by highlighted?
In this example, my mouse is not on the tab, but I can still see what page I am on as the tab is a different color
highlight.png
You do not have the required permissions to view the files attached to this post.
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Custom navigation Bar and DIV

Post by captzero »

Antonio, well done. You have come a long way in a few weeks.

Also.....for what its worth..... I think your welcome message is a bit too long and a little confusing. :?
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
Post Reply