Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey,
I have 2 homepages:
- domain.com/hp1/index.html
- domain.com/hp2/index.html

How do I create a website where I can choose between those two sites?
I would like to have a page devided in two parts. every part should contain an icon/img...
This site should be compatible with desktops (horizontally divided) and phones (vertically divided)


Please help me :)

What I have tried:

HTML-Code
HTML
<body>
   <div id="div1">1</div>
   <div id="div2">2</div>
</body>


CSS-Code
CSS
#div1{
   width: 50%;
   display: block;
}

#div2{
   width: 50%;
   display: block;
}
Posted
Updated 28-Jul-16 21:39pm

1 solution

Just put two hyperlinks-
HTML
<body>
   <div id="div1"><a href="domain.com/hp1/index.html">1</a></div>
   <div id="div2"><a href="domain.com/hp2/index.html">2</a></div>
</body>


Please check following tutorial for further infromation-
HTML Links[^]

Hope, it helps :)
 
Share this answer
 
v2
Comments
Tobias Wälde 29-Jul-16 3:49am    
Thanks for your quick answer :D
but that's not the problem...
the problem is the visualisation of the two divs

take a look at my homepage:
http://www.tobiaswaelde.de/

then try resizing or open the page on your mobile...
Suvendu Shekhar Giri 29-Jul-16 4:09am    
Ok. So you need the divs to span over the complete screen?
Tobias Wälde 29-Jul-16 5:05am    
with all paddings and margins =0px, and divs with width=50% there's still 3 or 4 pixels space between them and i don't know why

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900