EvilZone

Programming and Scripting => Web Oriented Coding => : smaster93 November 03, 2012, 10:26:02 AM

: need help with css and html
: smaster93 November 03, 2012, 10:26:02 AM
how to get content fixed on a html page and how to get the google top black strip
: Re: need help with css and html
: geXXos November 03, 2012, 10:48:07 AM
You mean you want to fix the content so it doesn't scroll on the page.
If this is the case it can be done through CSS "fixed" positioning



:
<style type="text/css">


#mydiv{
position: fixed;
left: 10px;
top: 50px;
}


</style>


<div id="mydiv">
Some content here
<>


What do you mean get the google top black strip ? You mean to get rid of it ?

: Re: need help with css and html
: smaster93 November 16, 2012, 04:29:08 PM
I meant the black strip on which the search, images, youtube and other links are provided....
n by the way thnx for the reply....
: Re: need help with css and html
: relax November 16, 2012, 04:31:43 PM
make a div and possision it...
dont really see the problem :/

and yeah introduce yourself
: Re: need help with css and html
: lucid November 16, 2012, 06:48:59 PM
I still have no idea what you mean by google black strip.  :o
: Re: need help with css and html
: relax November 16, 2012, 08:55:03 PM
I still have no idea what you mean by google black strip.  :o

this i think
: Re: need help with css and html
: silenthunder November 17, 2012, 09:00:38 PM
I still have no idea what you mean by google black strip.  :o

It's not black on most computers, but relax has it right. Just in a different language lol
: Re: need help with css and html
: ande November 17, 2012, 09:15:15 PM
This should do aprox what you want. But in all honestly, I dont recommend fixed or absolute positions. There really is only one rule, DON'T USE FIXED OR ABSOLUTE POSITIONS.

:
<html>
<head>
    <title>My title</title>

    <style type="text/css">
        html {
            width: 100%;
            height: 100%;
        }

        body {
            width: 100%;
            height: 100%;
        }

        #topBar {
            height: 25px;
            width: 100%;
            background-color: #ddd;
        }

        #contentContainer {
            height: 250px;
            width: 250px;
            position: fixed;
            left: 100px;
            top: 100px;
        }
    </style>

</head>

<body>
    <div id="topBar">Herp | derp | surp | nurp<>

    <div id="contentContainer">This is my content<>
</body>
</html>


PS: You have to change the <> to </ d i v > (without spaces) in there, for whatever reason I am not allowed to post it..
: Re: need help with css and html
: relax November 17, 2012, 10:20:59 PM
for whatever reason I am not allowed to post it..

thats interesting...