SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: Two CSS issues

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Two CSS issues

    Hi,

    I have two CSS issues I can't seem to fix on the following page:

    http://www.infinitybeachhouse.com.au/build/the-retreat/

    Issue 1: I can't get the main header navigation to float to the right of the container (currently floating to the left). Any fix for this would be greatly appreciated.

    Issue 2: The blue buttons near the bottom of the page > the first one is correct (white text on blue button), but the second and third buttons which are the exact same markup have blue text (so it's invisible on the blue BG).

    I know these are probably really basic issues, but I am struggling to fix them.

    Thanks in advance for any help!

    Cheers
    Jed

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,613
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by Thordendal View Post
    Issue 1: I can't get the main header navigation to float to the right of the container (currently floating to the left).
    Not really sure what you mean. Menu is currently sitting to the right.

    Issue 2: The blue buttons near the bottom of the page > the first one is correct (white text on blue button), but the second and third buttons which are the exact same markup have blue text (so it's invisible on the blue BG).
    Same thing, really. They all look the same to me. What browser are you using? Maybe you need to refresh the page / clear the cache.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph,

    Sorry I probably didn't explain that very well:

    Issue 1: The menu site to the right, but I need the menu to be right aligned to the container so it sits all the way across (at the moment it's sitting in the left of it's container).

    Issue 2: Oh sorry, it's just the visited state that it's happening – I refreshed and it is fine until you click on it and then look again.

    Cheers

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,613
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    You could just switch the LI floating from left to right (layout.css line 20):

    Code:
    media="screen, projection"
    #navigation ul, #navigation ul li {
    float: right;
    margin: 0;
    padding: 0;
    }
    But the LIs will sit in reverse order. So you could perhaps add this instead:

    Code:
    #navigation {
      float:right; 
      width: auto;
    }
    In terms of fining the link, add this:

    Code:
    a.button:visited {color:white;}

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice one! Fixed, thanks.

    Hey can I please ask you one more question on this menu?

    Currently I have the "//" dividers as content in the CSS (as li:after), and I have styled the last one as white so you cant see it. But it's still there and it stuffs up the right alignment of the menu.

    I tried to remove the last // with CSS but couldn't work out how to do it. Any ideas?

    Cheers

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,613
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by Thordendal View Post
    I tried to remove the last // with CSS but couldn't work out how to do it.
    You've left off :after in your override rule. You'd need to do something like this:

    Code:
    #navigation ul li:last-child:after {
    	content: "";
    }

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great – thanks!

  8. #8
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,232
    Mentioned
    52 Post(s)
    Tagged
    2 Thread(s)
    Thordendal, I recommend that you take a quick look at the HTML. There are some peculiarly placed <p> tags that MIGHT cause problems.

    Line 333
    Code:
    <div class="one_half"></p>
    Line 347
    Code:
    <p></div><div class="one_half last"></p>
    Line 378
    Code:
    <p></div><div class="clear"></div></p>
    Open <p> Close </div> is not an "expected" combination. and Close </p> without a preceeding Open <p> is likewise unexpected.

    I don't get the impression that any of them belong in the code. If that's true, then the page is "working" because of the forgiveness of browsers. No harm in giving it a look.


Bookmarks

Posting Permissions

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