Forum Moderators: not2easy

Message Too Old, No Replies

Trying to make a margin fix.

         

salo

6:40 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



In Firefox I'm having trouble with having a floating id (right) to stop at a certain point using margin left.
I can't find a workaround this to both work in ie and ff.
you can notice in the css:
#main #menu {
border-left:1px solid #000;
border-bottom:1px solid #000;
float:right;
width:230px;
background:#eee;
margin:0px 0px 10px 500px;
}

i used 500px as the left margin and it shows properly in ie. any suggestions?
here is the code:

html:

<!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>{title}</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="main">
<div id="menu">
<div class="highlight">
<h3>Home</h3>

</div>
<div class="highlight">
<h3>Theatre Season</h3>
</div>
<div class="highlight">
<h3>Rentals &amp; Facilities</h3>
</div>
<div class="highlight">
<h3>Get Involved</h3>
</div>
<div class="highlight">
<h3>CHAC Bar</h3>
</div>
</div>

<br />
</div>
</body>
</html>

--------------------------------------

css:

body {
margin:0px 0px 0px 0px;
font-family: "Trebuchet MS", Arial, sans-serif;
background-color: #006095;
}

#main {
border: 1px none #000;
padding: 0px 0px 5px 10px;
}

#main #menu {
border-left:1px solid #000;
border-bottom:1px solid #000;
float:right;
width:230px;
background:#eee;
margin:0px 0px 10px 500px;
}

p,h1,pre {
margin:0px 10px 10px 10px;
}

h1 {
}

h2 {
}

h3 {
margin-bottom: 4px;
margin-top: 0px;
margin-right: 0px;
margin-left: 0px;
padding: 0px;

}

h4 {
margin-top: 5px;
padding-top: 5px;
color: #70C4EF;
margin-bottom: 2px;
padding-bottom: 2px;
font-size: 14px;
text-transform: uppercase;

}

h5 {
font-family: "Trebuchet MS", Arial, sans-serif;
color: #FFFFFF;
font-weight: bold;
font-size: 16px;
white-space: nowrap;
margin: 1px;
padding: 0px;

}

h6 {
}

#menu p { font-size:10px}

.highlight {
width: 90%;
border: 1px solid #FFFFFF;
padding: 5px;
margin: 5px;
font-weight: normal;
}

j4mes

6:44 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



Shouldn't there be a comma between #main and #menu?

#main, #menu

?

salo

6:49 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



im using #menu within #main, not styling both.

i also noticed now with content the #menu is clearing the content in #main which i don't want. even setting the clearing attribute doesn't seem to change it...

arg.

sifredi

6:52 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



stop at a certain point

Exactly what do you mean by that?

salo

7:04 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



i did a quick layout image

<Sorry, no example pages.
See Forum Charter [webmasterworld.com]>

by stopping at a certain point i mean having a min-width on the #main

the image should help clear things.

[edited by: tedster at 7:47 pm (utc) on June 30, 2005]

salo

7:26 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



im trying new things but still not getting it...

i'm still unsure about clip, doesn't ever seem to work correctly.