EvilZone
Programming and Scripting => Web Oriented Coding => : 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
-
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 ?
-
I meant the black strip on which the search, images, youtube and other links are provided....
n by the way thnx for the reply....
-
make a div and possision it...
dont really see the problem :/
and yeah introduce yourself
-
I still have no idea what you mean by google black strip. :o
-
I still have no idea what you mean by google black strip. :o
this i think
-
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
-
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..
-
for whatever reason I am not allowed to post it..
thats interesting...