This is a discussion on "Nav bar descreases in height when click on link" within the Web Page Design section. This forum, and the thread "Nav bar descreases in height when click on link are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Nav bar descreases in height when click on link
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Nav bar descreases in height when click on link
For some reason the nav bar decreases in height when the guestbook link is clicked on.
Any help would be appreciated: http://www.club-amigos.co.uk/guestbook/gbook.php |
|
|
|
#2
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi there matey
Just had a look over your code. 2 things ... 1) Your CSS is very neat, Well done 2) I beleive the problem is being caused because you haven't set the height element of the "#navcontainer li a {" Currently, Your code says ...
|
|
#3
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi,
Thanks for the compiment on my coding, that sort of works. The only problem which l have now is that the text is not aligned in horizontally in the nav bar when l click on the guestbook and forum links. Any ideas as to how l resolve this issue? http://www.club-amigos.co.uk/mboard/mboard.php http://www.club-amigos.co.uk/guestbook/gbook.php |
|
#4
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
hmmm
I can honestly say ive never seen this happen before Try removing the padding-bottom. Techinically, Its not doing anything. Hope this helps... |
|
#5
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Still no luck any other ideas or suggestions?
|
|
#6
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi jj1234
I've re-written your code http://www.dpsites.co.uk/help/ Obviously, put your graphics in hehehe ... That SHOULD work, its coded for HTML 4.0 Strict. Feel free to use my source code... the style sheets used can be found ... Here ... http://www.dpsites.co.uk/help/css/elements.css And here ... http://www.dpsites.co.uk/help/css/layout.css Hope this helps Dan |
|
#7
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi, many thanks for that it is much appreciated.
I only have one concern and that is that l concerned in putting brand new coding in , in case l make things worse. i..e l am reluctant to cut and paste in case l miss some things out. Could you possibly tell me what alterations l need to make to my current coding, in case l make a hash of pasting the new code in. |
|
#8
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi
Just replace you current section of code titled "#navcontainer" with the following ...
Ooooo And at the top of your atual content pages ... Change your doctype to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Now that SHOULD work |
|
#9
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
No luck if you see forum link pages you will see what l mean.
I have not changed the doc-type yet, in case it make things worse. http://www.club-amigos.co.uk/navbar.jpg You will notice the text is not aligned in the centre I have therefore returned it back to its original state Last edited by jj1234; Apr 13th, 2006 at 09:43. |
|
#10
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi again
Create a new folder on your web server, copy the site to that folder and play with that ... Then it doesnt matter if it goes WRONG! You NEED to change the doctype, or the CSS i've written wont take effect Good luck |
|
#11
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi, l have done and it works!
http://www.club-amigos.co.uk/test/index.htm Many thanks for your help. I have one small problem and would appreciate your help and that is with the caldner page, for some reason the end nav bars are chopped off. http://www.club-amigos.co.uk/test/april.html I have tried to make adjustments but no luck, l have made change to doc type but no luck. css: html, body { margin : 0; padding : 0; } body { font : 12px "Lucida Sans Unicode", Verdana, sans-serif; color : #333333; background: #e9eef4; width : 100%; } a:link { color : blue; background : transparent; text-decoration : none; } a:visited { color : purple; text-decoration : none; } a:hover { color : red; } a:active { color : red; } h1 { text-align : center; font : bold 17px "Lucida Sans Unicode", Verdana, sans-serif; margin: 0px; clear: left; padding-top: 1px; padding-bottom: 2px; background: #ffffff } #wrapper { background-color: white; overflow: auto; text-align : left; padding : 0; border-top : 1px solid #66635C; border-bottom : 1px solid #66635C; border-left : 1px solid #66635C; border-right : 1px solid #66635C; margin : 5px auto; width : 761px; } #header { background-image : url(club_amigo_logo.jpg); background-repeat : no-repeat; margin: 0px; height : 107px; } #content { margin: 0px; padding : 10px; background : #ffffff; } #content p { margin : 0 60px 8px 0; font-family:verdana,arial,helvetica,sans-serif; text-align : justify; } #rightcol {} #rightcol p {} #navcontainer { Background: #F0F0F0; Display: block; Height: 18px; Width: 760px; } #navcontainer ul { Margin: 0; Padding: 0; } #navcontainer li { List-style: none; Float: left; Margin: 0; Padding: 0; } #navcontainer li a { Background: #DEFFFF; Border-bottom: #84979C 1px solid; Border-right: #84979C 1px solid; Border-top: #84979C 1px solid; Color: #444444; Display: block; Float: left; Height: 17px; Padding-top: 2px; Text-align: center; Text-decoration: none; Width: 94px; } #navcontainer .last { BORDER-RIGHT: none; WIDTH: 97px; overflow: hidden; } #navcontainer ul li a:hover { color : #000; background : #FFCCCC; } #navcontainer a:active { background : #ffecd2; color : #fff; } #specialborder { border-right : 1px solid #84979C; } #searchform { background: #fff; padding: 2px; width: auto; border: 1px solid #999; } #searchbut { background: #fff; font-size: 90%; width: auto; border: 1px solid #333333; margin-left : 2px; } #searchinput { background: #deffff; font-size: 90%; border: 1px solid #1d4151; margin-left : 2px; width : 53px; } #footer { border-bottom : 1px solid #000; border-top : 1px solid #000; margin : 0 28px 0 25px; padding : 10px; } #counter { display : none; } #navcal { margin-top : 0; margin-left: 10px; } #navcal ul { background: #fff; list-style : none; margin : 0 0 0 0px; /* adjust left margin to suit */ padding : 0; text-align : center; } #navcal li { margin-top: 10px; background: #fff; display : block; float : left; padding-bottom: 10px; } #navcal LI A { BORDER-left: #84979c 1px solid; BORDER-TOP: #84979c 1px solid; DISPLAY: block; BACKGROUND: #deffff; WIDTH: 61px; COLOR: #444; BORDER-BOTTOM: #84979c 1px solid; TEXT-DECORATION: none; TEXT-ALIGN: CENTER; padding-top: 2px; padding-bottom: 2px; } #navcal .last { BORDER-RIGHT: #84979c 1px solid; WIDTH: 50px; } #navcal ul li a:hover { color : #000; background : #FFCCCC; } #navcal a:active { background : #ffecd2; color : #fff; } #navcalbottom { margin-top : 0; margin-left: 0px; background: #ffffff; } #navcalbottom ul { background: #fff; list-style : none; margin : 0 0 0 0px; /* adjust left margin to suit */ padding : 0; text-align : center; } #navcalbottom li { margin-top: 10px; background: #fff; display : block; float : left; padding-bottom: 10px; background: #fff; } #navcalbottom LI A { BORDER-LEFT: #84979c 1px solid; BORDER-TOP: #84979c 1px solid; DISPLAY: block; BACKGROUND: #deffff; WIDTH: 248px; COLOR: #444; BORDER-BOTTOM: #84979c 1px solid; TEXT-DECORATION: none; TEXT-ALIGN: CENTER; padding-top: 2px; padding-bottom: 2px; } #navcalbottom .last { BORDER-RIGHT: #84979c 1px solid; WIDTH: 241px; } #navcalbottom ul li a:hover { color : #000; background : #FFCCCC; } #navcalbottom a:active { background : #ffecd2; color : #fff; } |
|
#12
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
hmm ... it appears fine in my screen buddy ... Could you explain furthur what you mean?
|
|
#13
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi,
I managed to rsolve it , the only minor issue l have now is that for some odd reason the text moves verticallally up on the nav bar when l click on the guestbook link, l personally don't think this issue is resolvable, would you agree? |
|
#14
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hi again
This should sort itself out if ... You need to add a font-family, and a font-size to your "#navcontainer li a" and your "#navcontainer li a:hover". Hope it works |
|
#15
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
That worked great thanks for that, how did you work that out, l am just curious thats all?
The only issue l have now, which is very minor is that when l click on the forum and guestbook and forum links on the navbar the end link (contact) is not fully aligned to the far right. It is fine with all the other pages for some reason? Last edited by jj1234; Apr 13th, 2006 at 13:19. |
|
#16
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Working it out was realativly easy mate. Im only 17 but ive been playing with CSS and web standards for nearly 2 years now. Little problems like boxes resizing themselves can only be caused by a small number of things.
I really have no idea why the link at the top doesnt align with the container on JUSt those 2 pages. Ill have a look for you when i get home tonight. Its quite hard to figure out at college :P Cya soon |
|
#17
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
It would be appreciated if you could do this, as l am baffled, l am very impressed by the skills for someone of your age.
|
|
#18
|
|||
|
|||
|
Re: Nav bar descreases in height when click on link
Hey JJ
Dont worry mate, i havent forgotton about you, im just a little snowed under with some current work of my own. Ill go voer your code at some point today, And ill have an answer with you for tonight Cheers Note to an Admin : Can i ask why 13 year old "James Trickey" has given me -1 brownie points? Thanks |