2 replies [Last post]
anumohan
anumohan's picture
Offline
newbie
Last seen: 5 years 47 weeks ago
Timezone: GMT+5.5
Joined: 2013-11-22
Posts: 4
Points: 6

Need an another help in using CSS with PHP File

I created a Php File to create Div's (three blue boxes) in the same row of the webpage. but when I zoom the webpage for 3 or 4 times, the boxes go one below another.

My Php File is "index.php"

Test

My CSS File is "Stylesheet.css"

#Container{
margin: 0 auto;
width: 1200px;

}

#left{
background-color: blue;
height:300px ;
width: 100px;
display:inline-block;
}

#center{
background-color: blue;
height:300px ;
width: 100px;
display: inline-block;
}

#right{
background-color: blue;
height:300px ;
width: 100px;
display: inline-block;
}

How to make website contents stay in the same row no matter how much we zoom the browser window

Please help.

Thanks in advance.

anumohan
anumohan's picture
Offline
newbie
Last seen: 5 years 47 weeks ago
Timezone: GMT+5.5
Joined: 2013-11-22
Posts: 4
Points: 6

php code <!doctype

php code

<!doctype html>
 
<head>
<title>Test</title>
<link rel="stylesheet" href="stylesheet.css"/>
</head>
 
<body>
<div id=”Container” align="center">
<div id="left"></div>
<div id="center"></div>
<div id="right"></div>
</div>
</body>
 
</html>

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 4 days 12 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Hey anumohan, The double

Hey anumohan,
The double quotes around Container are wrong.
They are interpreted by the browser as some other character.
Have a look at the code highlighting above and notice Container is black not red.
If you add a background color to #Container it won't show.

So you just need to retype them and make sure the character encoding of your editor is UTF-8