Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13

Thread: Css

  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Css

    Hi,

    I'm designing a website for a painter, though am having trouble with the css for the site www.edenwebbdesign.se.

    The first page you come to functions ok, but when you click on the other pages, the navigationmenu and logo moves and also has a question mark symbol appear where there should be the swedish letters åäö.

    The Gallery page is using Galleria image slider so have asked on that forum how to fix that.

    I would be very grateful for your help,

    Kirai

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,858
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    On the first page, you have
    Code:
    <ul id="nav">
        <li><a href="index.html">Hem</a></li>
        <li><a href="om_foretaget.html">Om Företaget</a></li>
       <li><a href="tjanster.html">Tjänster</a></li>
       <li><a href="galleri.html">Galleri</a></li>
        <li><a href="kontakt.html">Kontakt</a></li>
    </ul>
    where as on the second page you have
    Code:
    <div id="nav">
    <ul>
       <li class="active "><a href="index.html"><span>Hem</span></a></li>
       <li><a href="om_foretaget.html"><span>Om F�retaget</span></a></li>
       <li><a href="tjanster.html"><span>Tj�nster</span></a></li>
      
       <li><a href="galleri.html"><span>Galleri</span></a></li>
       <li><a href="kontakt.html"><span>Kontakt</span></a></li>
    </ul></div>
    You need to change the encoding of the file to UTF-8, before saving the file with unicode letters. You may easily do this in Notepad++ by opting the 'UTF-8 without BOM' under Encoding tab.


    PS: Why do you need to repeat the same codes on all pages? You may save all common codes in separate files use some serverside scripts like PHP to include them to the desired places.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    Also looks like the div "band navigation" is not closed on the internal pages.

  • #4
    New Coder
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks guys,

    abduraooft, got the symbols away, though am still unsure what is wrong with the second page, is still making the menu become smaller and move right.

    Am too much of a novice unfortunately to do anything with php. Thanks for the advice though.

    aaronhockey_09, can't see what you mean about div band navigation? they seem closed when I highlight the foremost div at the start of the band.

  • #5
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    Hey
    took a second look
    and i think i found the problem.

    on the first home page, your un ordered list item looks like this

    Code:
    <li><a href="index.html">Hem</a></li>
    While on the internal pages it looks like this

    Code:
    <li><a href="index.html"><span>Hem</span></a></li>
    remove the Span tags, and i think it should work properly.

  • #6
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    And it actually only seems to be the om_foretaget page that has this mistake

  • #7
    New Coder
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Thanks for spotting the mistake. Took away the span tags, still same problem though
    Also noticed that the logo and menu is still moving to the right on the Gallery page. The only thing I can think of is something to do with the padding or margin, but the css I have should be global.

  • #8
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,858
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Now, your second page has
    Code:
    <ul id="nav">
    <ul>
       <li><a href="index.html">Hem</a></li>
        <li><a href="om_foretaget.html">Om Företaget</a></li>
       <li><a href="tjanster.html">Tjänster</a></li>
       <li><a href="galleri.html">Galleri</a></li>
        <li><a href="kontakt.html">Kontakt</a></li>
    </ul></ul>
    Make use of validator for instances like this, see http://validator.w3.org/check?verbos...foretaget.html
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #9
    New Coder
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks abduraooft, have made the correction and now works perfectly

    Will go through the entire website with validator and see what errors there are

    You mentioned using php to have as a holder for common code elements. Could you explain at a novice level how it is done?

  • #10
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,858
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #11
    New Coder
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi abduraooft.

    I've now checked it with a validator.

    Most of the pages are now fixed, however some of the pages still have errors that I don't understand.

    http://validator.w3.org/check?uri=ht...alidator%2F1.3

    http://validator.w3.org/check?uri=ht...alidator%2F1.3

    Thanks for the links about the php, will do it with a test site after I'm done with this site so I can implement it later.

    The only problems that seem to be with the site now is that the gallery page moves to the right when you click on the menu item, and a white area appears under the copyright statement area

  • #12
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    945
    Thanks
    0
    Thanked 129 Times in 128 Posts
    some of the errors in tjanster.html is because you have forgotten to close the alt attributes.

    one error is because you have class="thumbnail edged" and class="rounded" within the same tag. You can only have one class="" for each element

    the rest is because you, on the img have longdesc="" , which is both obsolete and not separated from the previous attribute by a space.
    ---
    Solution:
    close the alt
    remove all instances of longdesc=""
    and merge the 2 class attributes:
    Code:
    ... class="thumbnail edged rounded" ...

  • #13
    New Coder
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Lerura,

    Have now validated the page. The only problem that remains now is the problem with the Gallery page. What is it that makes the footer content move further up to the border of the content area and create the white space underneath the copyright section? Also the page still seems to move slightly to the right compared to the others.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •