[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

span width is 100%...yet IE6 leaves space on the right

Posted on 2004-04-17
3
Medium Priority
?
418 Views
Last Modified: 2011-09-20
I was expecting the code below to display a navy bar across the top of the browser window. However, in IE6 (though not Mozilla) about 5px of space is left between the right of the bar and the edge of the browser. I would very much appreciate any help.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title>Welcome</title>
  <style type="text/css">
    span.LogoBar {position:absolute;
        top:0%; height:6em; width:100%; right:0%; left:0%;
        text-align:center; background-color:navy;
        border:2px solid black;}
  </style>
</head>
<body>
  <span class="LogoBar">
      <h1 class="LogoBar">Welcome</h1>
  </span>
</body>
</html>
0
Comment
Question by:bobwood2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10851769
bobwood2000 --

What's going on is that your span is still within the body. You need to reduce the body padding. Here's a way to get a bit further with regular HTML ( ** Look at the body tag ** ) -- in a sec I'll see if there's a good css way to get want you want.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title>Welcome</title>
  <style type="text/css">
    span.LogoBar {position:absolute;
        top:0%; height:6em; width:100%; right:0%; left:0%;
        text-align:center; background-color:navy;
        border:2px solid black;}
  </style>
</head>
<body marginwidth="0" rightmargin="0">
  <span class="LogoBar">
      <h1 class="LogoBar">Welcome</h1>
  </span>
</body>
</html>
0
 
LVL 4

Accepted Solution

by:
john-at-7fff earned 1400 total points
ID: 10851770
bobwood2000 --

Yeah, this is the way to get it all the way out (note style tag on body):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title>Welcome</title>
  <style type="text/css">
    span.LogoBar {position:absolute;
        top:0%; height:6em; width:100%; right:0%; left:0%;
        text-align:center; background-color:navy;
        border:2px solid black;}
  </style>
</head>
<body style="margin: 0">
  <span class="LogoBar">
      <h1 class="LogoBar">Welcome</h1>
  </span>
</body>
</html>
0
 

Author Comment

by:bobwood2000
ID: 10851985
Thank you so much!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question