Jump to content

Need help with a simple html website problem

Go to solution Solved by Pollux113,
11 minutes ago, Lehti said:

I'm not an HTML expert, but why is the line 


title {margin-bottom:60px;}

commented out? I think you can fix it by uncommenting it and replacing 60px with 10px.

That is not being commented out. It is an ID selector - apply styles to an element with ID is title (in this case it is h1).

 

@Grx: I can't view your attached pics but from my guess you can change this style:

#title {margin-bottom:60px;}

to:

#title {margin-bottom:60px; margin-top: 10px;}

 

 

Hi there!

 

I've got a simple, one-page privacy policy for my google play dev account.

Here is the code:

 

<!DOCTYPE html>

<html>

    <head>

        <meta charset="utf-8">
        <title>Moon Light Games Privacy Policy</title>
        <style>
            body {background-color: rgb(59, 59, 59);
                  background-image: url("https://dl.dropboxusercontent.com/s/a8izsv4lqpqflsh/Moon%20Light%20Games%20Banner.png?dl=0");
                  background-repeat: no-repeat;
                  background-attachment: fixed;
                  background-position: center; 
            }
            
            h1 {color: rgb(255, 255, 255);}
            h2 {color: rgb(255, 255, 255);}
            h2 {line-height: 30px;}
            
            #title {margin-bottom:60px;}
            #time_modified {margin-top:45px;}
            
            #container {
            width: 640px;
            margin: auto;
            border: 1px solid rgb(148, 148, 148);
            border-top: 10px solid rgb(181, 181, 181);
            padding: 10px;}
             
            .outline {
    color: #fff;
    text-shadow: #000 0px 0px 4px;
}
            
        </style>
    </head>
    <body>
        <div id="container" class="outline">
        <h1 id="title">Moon Light Games<br><b>Privacy Policy</b></h1>
        
        <h2 class="outline">Our applications neither collect nor use any user data.</h2>
        <h2 class="outline" id="time_modified">This Privacy Policy was last modified on 6th June 2016.</h2>
        </div>
    </body>

</html>

And it looks something like this:

Photo1.png?dl=0

 

Now I'd like to make a little adjustment to the spacing between the "Moon Light Games" and the top line.

I want it to be 10px, just like the green arrow.

Photo2.png?dl=0

 

Thanks in advance!

Link to comment
https://linustechtips.com/topic/647937-need-help-with-a-simple-html-website-problem/
Share on other sites

Link to post
Share on other sites

Just now, Lehti said:

I'm not an HTML expert, but why is the line 


title {margin-bottom:60px;}

commented out? I think you can fix it by uncommenting it and replacing 60px with 10px.

Wasn't "//" the way you commented something?

 

I also tried with and without the # and it did not seem to make a difference...

Link to post
Share on other sites

1 minute ago, Grx said:

Wasn't "//" the way you commented something?

 

I also tried with and without the # and it did not seem to make a difference...

It really depends on the language: C comments with //, Pascal (and Delphi) with (* COMMENT *), other languages with #.

Or, if you're not too far into the development of your website, use a CMS like Wordpress and call it a day.

Link to post
Share on other sites

11 minutes ago, Lehti said:

I'm not an HTML expert, but why is the line 


title {margin-bottom:60px;}

commented out? I think you can fix it by uncommenting it and replacing 60px with 10px.

That is not being commented out. It is an ID selector - apply styles to an element with ID is title (in this case it is h1).

 

@Grx: I can't view your attached pics but from my guess you can change this style:

#title {margin-bottom:60px;}

to:

#title {margin-bottom:60px; margin-top: 10px;}

 

 

Link to post
Share on other sites

Just now, Pollux113 said:

That is not being commented out. It is an ID selector - apply styles to an element with ID is title (in this case it is h1).

 

@Grx: I can't view your attached pics but from my guess you can change this style:


#title {margin-bottom:60px;}

to:


#title {margin-bottom:60px; margin-top: 10px;}

 

 

I have set the margin-top to -5px and now looks how I wanted.

Thank you for the help!

Link to post
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

×