Hey, this is the lounge, I can post anything I want here, right? :P
Haven't done HTML and CSS in a while, hence why I ask. :)
My dad asked me to work on a website for his participation on a "rally-ish" event. He's going to drive for Kika, which contributes to research on different kinds of cancer that occur to children.
That's it for the background of my question, time for the question itself:
I want to place two divs directly next to each other (not underneath one another, which is currently the case). How would I go around doing that while not changing my current structure too much?
(The divs "icon" and "title" should be next to each other, just as with "links" and "content".)
NOTE: The childish coloring is just for now, I will change it when I get the images to use for this.
index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd"/>
<html>
<head>
<title>Black Jeep Arctic Challenge for Kika</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
</head>
<body>
<div id="page">
<div>
<div id="icon">BLA<br/>BLABLA</div>
<div id="title"><h1>BLACK J.A.C.K.</h1>Black Jeep Arctic Challenge for Kika</div>
</div>
<div id="links">
<a href="content/home.html" target="frame">Home</a><br/>
<a href="content/team.html" target="frame">Team</a><br/>
<a href="content/auto.html" target="frame">Auto</a><br/>
<a href="content/kika.html" target="frame">Kika</a><br/>
<a href="content/blog.html" target="frame">Blog</a><br/>
<a href="content/foto.html" target="frame">Foto's</a><br/>
<a href="content/spon.html" target="frame">Sponsoren</a><br/>
<a href="content/wspo.html" target="frame">Sponsor worden</a><br/>
<a href="content/link.html" target="frame">Links</a><br/>
<a href="content/cont.html" target="frame">Contact</a><br/>
</div>
<div id="content"><iframe frameborder="0" width="100%" height="100%" name="frame" src="content/home.html"/>
<noframes>Deze pagina gebruikt frames. Om deze pagina goed te kunnen bekijken zult u frames ingeschakeld moeten hebben. Wanneer uw browser geen frames ondersteund is het aangeraden om een browser te downloaden die dit wel doet zoals Internet Explorer, Firefox of Google Chrome.</noframes></div>
</div>
</body>
</html>
|
stylesheet.css
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
a
{
text-decoration:none;
}
a:link {}
a:visited {}
a:hover {}
a:active {}
#page
{
background: blue;
display: inline-block;
height: 100%;
margin-bottom: 2%;
margin-right: 3%;
margin-left: 3%;
margin-top: 2%;
width: 94%;
}
#icon
{
background: yellow;
clear: right;
display: inline-block;
float: left;
height: 20%;
width: 20%;
}
#title
{
background: black;
color: white;
clear: left;
display: inline-block;
float: right;
margin-left: 20%;
width: 80%;
height: 20%;
}
#links
{
background: green;
display: inline-block;
width: 20%;
height: 80%;
}
#content
{
background: red;
display: inline-block;
margin-left: 20%;
width: 80%;
}
|
Thanks in advance.