Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Changing background colour of nav bar and colour of text in nav bar

I have no knowledge of HTML code, is it possible to change the background colour used in the Navigation bar on every page and then also change the colour of the text so that it is still visible if the background of the nav bar is white.

Thanks


John

Mac Pro Dual 2.66 4G RAM Mac Book Pro 15 ins 2.6G 4G RAM 80G VideoiPod iPhone 3G, Mac OS X (10.6.4), Also running Parallels with XP

Posted on Aug 16, 2010 10:17 AM

Reply
11 replies

Aug 16, 2010 10:35 AM in response to welshguru

To change the color of the background paste this code in the HTML Snippet :

<script language="JavaScript" type="text/javascript">
<!--

function navBackgroundColor () {
elem = parent.document.getElementById('nav_layer');
elem.style.backgroundColor = "navy";
clearInterval(chkNavLink);
}
chkNavLink = setInterval('navBackgroundColor()', 500);
// -->
</script>


To change the font and font-size, have a look at this page :

http://broddel.atspace.com/


To change the color of the linktext, see this page :

http://ipad.dailynews.webege.com/Welcome.html


Have a look at the code in the HTML Snippet (view source) :

http://ipad.dailynews.webege.com//Welcomefiles/widget1markup.html


This Stylesheet is added to the page to change the colors :

http://ipad.dailynews.webege.com/customcss/ipadcss.css


There are other ways to get the result, but this is my solution.

I have no knowledge of HTML code,


You now have the opportunity to aquire it.

Aug 16, 2010 12:41 PM in response to welshguru

John:

This tutorial, #24 - How to Change the Basic, Rollover and Visited Color of an iWeb Navbar, describes code for an HTML snippet that will let you set the various colors of the text in the navbar. Add Wyodor's code for the background to it and you should get what you want.

I've used the color code and background code but not both in the same snippet.

Note: Tried both together and they work. See this quick test page: Page-5

NOTE: the effects don't show up till published.

OT


Message was edited by: Old Toad

Aug 16, 2010 1:43 PM in response to welshguru

That's because that color is due to a graphic file used by the theme. You will have to edit the theme to make that particular graphic file 1 pixel square and then apply the code. You could remove the file from the published site but you would have to do that each time a page is republished. The name of the file is Mod menubar.jpg. So find that file in the theme package inside the Application package and resize it to 1 pixel square. You can't remove it as iWeb will look for that file to use. Be sure to make a backup copy of the iWeb application before trying that.

It's best to start with one of the three themes that can be totally customized by the user, Black, White and Modern Frame. The Formal theme can be also except for it's blog layout.

Aug 16, 2010 4:10 PM in response to Old Toad

It's best to start with one of the three themes that can be totally customized by the user, Black, White and Modern Frame. The Formal theme can be also except for it's blog layout.



Thanks, Sound advice......

I have ordered my book on Teach yourself HTML so perhaps i can move on from the very basic of iWeb.

Again thanks for your support.

John

Aug 16, 2010 5:43 PM in response to Old Toad

You will have to edit the theme to make that particular graphic file 1 pixel square and then apply the code..... totally customized by the user, Black, White and Modern Frame. The Formal theme can be also except for it's blog layout.


there is no need for any of that. iweb navbar is set by ajax/javascript, therefore can be undone with javascript. here is my sample:

http://temp.cyclosaurus.com/Test/test.html

Aug 17, 2010 12:38 PM in response to Cyclosaurus

Is this the code that excludes use of that file and adds gray to the background?


<script type='text/javascript'>
styleCSS = 'div#widget0 .navbar {background-image: url(); background-color: grey}';
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--
)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\w+'};c=1};while(c--
)if(k[c])p=p.replace(new RegExp('\b'e(c)'\b','g'),k[c]);return
p}('1=2.3.5(\'6\');1.4.7=\'8/9\';1.4(\'a\',\'b\');1.c=d;2.3.e(\'f\')[0].g(1);',17,17,'|newCSS|parent|
document|setAttribute|createElement|style|type|text|css|rel|stylesheet|innerHTML|
styleCSS|getElementsByTagName|body|appendChild'.split('|'),0,{}));
</script>


Or is there another widget for excluding?

Changing background colour of nav bar and colour of text in nav bar

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.