SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: CSS 100% width

  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS 100% width

    Hi all,

    I am having a very annoying problem with 100% div width.

    Here is my code:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
    	margin: 0px;
    	padding: 0px;
    }
    
    /* Sitename */
    #sitename { border-bottom: 3px solid black; display: block; position: absolute; top: 6.2em; left: 88px; z-index: 200; width: 100%; }
    #sitename span, 
    #sitename h1 { display: block; font-size: 1.4em; font-weight: bold; overflow: hidden; white-space: nowrap; padding: 0 0 0.3em 0; }
    #sitename a { text-decoration: none; }
    
    #sitename { border-bottom-color: #009999 !important; }
    #sitename span, 
    #sitename h1,
    #sitename a,
    #sitename a:visited { background-color: inherit; color: #009999; }
    
    -->
    </style>
    </head>
    
    <body>
    <div id="sitename">Content for id "sitename" Goes Here</div>
    </body>
    </html>
    The sitename div causes the page to have horizontal scroolbar. Any help is greatly appriciated.

    Regards,
    prodevstudio

  2. #2
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    Thank you so much for your help.

    Is there a way this can be done with position: absolute;?

    At the moment once I put rest of the content in I see the same problem.

    Thanks in advanced.


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
  •