tags:

views:

36

answers:

4

hey there.

i have put in a css box colored red and for some reason the very bottom left is cut off is there an explanation (picture below)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://cdn.jquerytools.org/1.2.4/full/jquery.tools.min.js"&gt;&lt;/script&gt;
<style type="text/css">
<!--
#test {
    background-color: #F00;
    height: 375px;
    width: 69%;
}

.imz{
    margin-bottom:-1%;

}

-->
</style></head>

<body>

<!-- the tabs -->
<span class="tabs">
    <a href="#"><img src="../../images/security_tabs.png" class="imz" style="float: left;" /></a>
    <a href="#"><img src="../../images/security_tabs.png" class="imz" /></a>
    <a href="#"><img src="../../images/security_tabs.png" class="imz" /></a>
</span>

<div id="test">
<!-- tab "panes" -->
<div class="panes">
    <div>First tab content. Tab contents are called "panes"</div>

    <div>Second tab content</div>
    <div>Third tab content</div>
</div>
<div id="test">
</div>

<!-- This JavaScript snippet activates those tabs -->
<script>

// perform JavaScript after the document is scriptable.
$(function() {
    // setup ul.tabs to work as tabs for each div directly under div.panes
    $("span.tabs").tabs("div.panes > div");
});
</script>

</body>
</html>

alt text

A: 

It's the width: 69%; that's causing it. Because you've got two divs with id=test the 69% is only applying to the second one. Don't use ids on more than one element.

Skilldrick
+2  A: 

You've a second <div id="test">. Get rid of it.

BalusC
wow im so stupid i cant belive i missed that thanks alot
Matthew Carter
+1  A: 

You have two opening divs with ID="test" so your CSS rule #test {width: 69%;} is being applied twice.

Blair McMillan
Also, count the divs. There are 6 open div tags and 5 closing div tags.
Brian Ray
I know, that's why I said two opening divs rather than just two divs.
Blair McMillan
A: 

Beside that you have some other css problem too, try this code ,its tested

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://cdn.jquerytools.org/1.2.4/full/jquery.tools.min.js"&gt;&lt;/script&gt;
<style type="text/css">
#test {
    background-color: #F00;
    height: 375px;
    width: 69%;
}

.imz{
    margin-bottom:-1%;
}
.tabs a{
float:left;
display:block;
}
#test{
clear:both;
}
</style></head>

<body>

<!-- the tabs -->
<span class="tabs">
    <a href="#">afs<img src="../../images/security_tabs.png" class="imz"/></a>
    <a href="#">asdf2<img src="../../images/security_tabs.png" class="imz" /></a>
    <a href="#">asdf3<img src="../../images/security_tabs.png" class="imz" /></a>
</span>

<div id="test">
<!-- tab "panes" -->
<div class="panes">
    <div>First tab content. Tab contents are called "panes"</div>
    <div>Second tab content</div>
    <div>Third tab content</div>
</div>

<!-- This JavaScript snippet activates those tabs -->
<script>

// perform JavaScript after the document is scriptable.
$(function() {;
    // setup ul.tabs to work as tabs for each div directly under div.panes
    $("span.tabs").tabs("div.panes > div");
});
</script>

</body>
</html>
JapanPro