Jump to content

a newbie question


Mette

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...