I want to have 3 aligned parallel to each other. I have seen few examples over internet but somehow they are not working for me. My html file is follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/css">
#root {
background-color: #eee;
}
#left_side {
float: left;
}
#center_s {
margin-left: auto;
margin-right: auto;
width: 65px;
background-color: #ccc;
}
#right_side {
float: right;
}
</script>
</head>
<body>
<div id="root">
<div id="left_side">LEFT</div>
<div id="right_side">RIGHT</div>
<div id="center_s">CENTER</div>
</div>
</body>
</html>
Thanks :)
not script. write style instead of script. there is syntax error. like this.
<style type="text/css">
#root {
background-color: #eee;
}
#left_side {
float: left;
}
#center_s {
margin-left: auto;
margin-right: auto;
width: 65px;
background-color: #ccc;
}
#right_side {
float: right;
}
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With