www.webdeveloper.com
Results 1 to 4 of 4

Thread: DIV and External CSS

  1. #1
    Join Date
    Feb 2007
    Posts
    170

    DIV and External CSS

    Hi all!

    I am trying to create a log with a link using DIV and external CSS. Does anyone know how to do it?

    Here is the HTML:

    Code:
    <div id="logo"></div>
    Here is the external CSS:




    Code:
    #logo {
    	text-align:center;
    	background-image: url(images/Background.gif);
    	background-position: center;
    	background-repeat: repeat-y;
    	position: relative;
    
    }
    When I viewed it, the logo is not center of my page and I was not able to add a link to the logo within the external CSS.


    Thanks in advanced!

  2. #2
    Code:
    #logo {background: url(images/Background.gif) center repeat-y ; display: block; margin:0 auto; width: ...px; text-align: center;}

  3. #3
    Join Date
    Feb 2007
    Posts
    170
    Thanks Coyotelab!

    Now I am trying to add a link to that image. Is there a way to add a link within external CSS?

    Thanks!!

  4. #4
    Adding link to style sheet NO, you can add link inside your HTML.
    If you like to make image map(click able image) this is how:
    HTML Code:
    <a href="http://domain.com/page.html"><img src="images/somepicture.gif" alt="sometext" /></a>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles