Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   HTML / XHTML / CSS (http://www.programmingforums.org/forum27.html)
-   -   A gap even though margin and padding are specified to zero. (http://www.programmingforums.org/showthread.php?t=11093)

java_roshan Aug 16th, 2006 1:54 PM

A gap even though margin and padding are specified to zero.
 
Can someone help me out with this problem at this page

http://n.1asphost.com/rosty/kjsc/index.asp

Though I have set the margin and padding of the list menu (navigation menu on the left) as zero the list is displayed slightly away from the left of the div containing it.
:

/*the left div CSS */
.leftcontainer{
                background-color:#ABA08E;
                float:left;               
                padding-left:0px;
                padding-top:1px;
                padding-bottom:1px;
                padding-right:1px;               
                border:2px outset #ABA080;               
                width: 25%
        }

/*the CSS code for UL*/
.menu ul{               
                margin: 0;
                padding: 0
        }


DaWei Aug 16th, 2006 2:30 PM

List style position? Marker specification? Gremlin? Unspecified but weird browser?

Sane Aug 16th, 2006 3:08 PM

It might not help, but you should at least try validating your HTML first: http://validator.w3.org/check?uri=ht...sc%2Findex.asp

If I can find some time, and no one has answered in the mean time, I'll look at the problem.

Agent 47 Aug 16th, 2006 3:58 PM

It's becaue the <ul> is of class 'menu' - it's not a child of an element
of class 'menu'.

Ditch the 'ul' and it'll work as expected. ;)
:

.menu
{               
        margin: 0;
        padding: 0
}

--47.

java_roshan Aug 17th, 2006 12:15 AM

Quote:

Originally Posted by DaWei
List style position? Marker specification? Gremlin? Unspecified but weird browser?

Nothing of these. A fundamental mistake! :(
Quote:

Originally Posted by Sane
It might not help, but you should at least try validating your HTML first: http://validator.w3.org/check?uri=ht...sc%2Findex.asp

It is valid HTML 4.0 Transitional; not Strict.

Quote:

Originally Posted by Agent47
It's becaue the <ul> is of class 'menu' - it's not a child of an element
of class 'menu'.

Exactly. It worked. And I understood now, why it worked. Thanks

a thing Aug 17th, 2006 2:05 AM

Quote:

Originally Posted by java_roshan
It is valid HTML 4.0 Transitional; not Strict.

Then make that your !DOCTYPE.


All times are GMT -5. The time now is 12:53 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC