Mette Posted February 13, 2006 Share Posted February 13, 2006 Hi I am trying to learn css, and this is my situation. I have used 'margin-top' to align (horisontical) the upper content of the site. But it seems as if i cant do that with 'margin-bottom' to align the content of the lower part of the site. Have tried to assign the attribute to ul, li, a and my container, footrin.Any help is being appreciated Mettehttp://www.gretethomsen.dk/grete06/gretet.htmMy CSS (maybe you recognize some of it from the examples;) ); BODY {color:#ffffcc;background-color:#000000;font-family:'Verdana', 'Arial', sans-serif, 'Courier New';}.headlin /*head left indeks*/{margin-top:90px;font-size:150%;float:left;}.headrin /*head right indeks*/{margin-top:100px;font-size: 100%;font-style:italic;float:right;}.linein /*line indeks*/{color:#ffffcc;clear:both;}.footrin /*foot right indeks*/{font-size: 80%;font-style:italic;padding:0.2em 0.6em;}img{ margin-left: 40px;}ul{list-style-type:none;float:right;}a{width:6em;color:#ffffcc;font-weight:bold;text-decoration:none;background-color:purple;padding:0.2em 0.6em;border-right:1px solid #ffffcc;}a:hover {background-color:#ff3300}li{display:inline} Link to comment Share on other sites More sharing options...
Mette Posted February 20, 2006 Author Share Posted February 20, 2006 hmmm, is my question to silly ? I'm not a programmer at all, have been using tables up til now, and is looking for other ways to do it. Is there any other method to align content to the bottom of the window ?/Mette Link to comment Share on other sites More sharing options...
Pollux Posted February 20, 2006 Share Posted February 20, 2006 Not everything you're saying seems to make sense, is it the main page's margin's you're trying to set? If you could try and explain which part of your web page at http://www.gretethomsen.dk/grete06/gretet.htm is wrong and how you want it to look I think it will be easier to understand. Link to comment Share on other sites More sharing options...
DarkElf Posted February 20, 2006 Share Posted February 20, 2006 I don't think you can actually do what you are trying to. If the page content doesn't actually fill the screen there will always be a blank space at the bottom, setting margins won't cause the content to stretch to fit it.Similarly if the content over fills the screen it won't squish it to fit the screen. It will create margin around the bottome of the page, but the page it self is allowed to run off the bottom of the browser window.Hope that makes sense. If you are trying to expand or contract your content to fit the screen you need to do it another way, for example set element dimensions to 100%.Alternatively if you just want the content at the bottom (the footer) to always display at the bottom, leaving a gap between the page content and the footer, you could use position:absolute. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now