Results 1 to 4 of 4

Thread: Headline with 'Go To Top' button

  1. #1
    Join Date
    Apr 2008
    Posts
    109
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Headline with 'Go To Top' button

    Heya!

    I've played around with giving my sub-headlines a graphical background as well as a small button in the right-most side of the DIV container.

    Here's the code for the sub-headline:

    Code:
    <p><div id="h2">Blanco vaske<a href="#headline" class="top" title="Gå til toppen"></a></div></p>
    And here's the CSS code for the Div Classes/ID's:

    Code:
    #h2 {
    	font-family: Georgia;
    	font-size: 1.9em;
    	width: 708px;
    	background: url(../images/bg_h1.gif) no-repeat;
    	height: 35px;
    	line-height: 35px;
    	text-indent: 5px;
    }
    
    .h2 {
    	font-family: Georgia;
    	font-size: 1.9em;
    	width: 708px;
    	background: url(../images/bg_h1.gif) no-repeat;
    	height: 35px;
    	line-height: 35px;
    	text-indent: 5px;
    }
    .top {
    	background: url(../images/close.gif) no-repeat;
    	margin: 0px;
    	padding: 0px;
    	float: right;
    	height: 30px;
    	width: 30px;
    	display: block;
    }
    And here's how it looks on the website:

    http://www.froso.dk/test/produkter/vaske.html

    Now, it works pretty ok... but I just can't place the damn X-icon on top of the grey background fader above in the sub-headline.

    Any help? lol


    Cheers,
    Bassa
    Last edited by bassa; 04-07-2009 at 03:59 PM.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Try this:
    Code:
    #h2 {
    	font-family: Georgia;
    	font-size: 1.9em;
    	width: 708px;
    	background: url(../images/bg_h1.gif) no-repeat;
    	height: 35px;
    	line-height: 35px;
    	text-indent: 5px;
    	position: relative;
    }
    .top {
    	background: url(../images/close.gif) no-repeat;
    	margin: 0px;
    	padding: 0px;
    	height: 30px;
    	width: 30px;
    	display: block;
    	position: absolute;
    	top: 6px;
    	right: 8px;
    }
    Good luck!

  3. The Following User Says Thank You to Snookerman For This Useful Post:

    bassa (04-07-2009)

  4. #3
    Join Date
    Apr 2008
    Posts
    109
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    YES, BABY!

    Thanks!

  5. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You're welcome, glad to help!
    You can go to your first post in this thread, click then click Go Advanced and add the Resolved prefix to the thread title.
    This will let other users know the problem has been solved.

    Good luck with your site!

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
  •