Log in

No account? Create an account
Previous Entry Share Next Entry
Can CSS do this?
It's Here
soltice wrote in webdesign
I have two <fieldset>'s that I want to appear side by side. They must have the same top alignment, reguardless of height. And to make things more difficult, they must take up the entire width of the screen.

This is easy enough to do with tables:


But I've heard the claim that CSS can do anything that tables can, so how do I do this?

  • 1
Dunno if it helps you, but I did something similar a while back...


It doesn't solve making it full screen width, but to do that I think you'd have to make a standardized layout (only x pixels wide) or do some kind of browser detect.

Take this style sheet, play with a bit, and you'll have what you want.



<style type="text/css">


#right { float: right;
background: green;
width: 50%;
border: 1px 1 px 1 px 1 px; }

#left { float: left;
background: blue;
width: 50%;
border: 1px 1 px 1 px 1 px; } --> </style>



<div id="right">
<p>This is the info on the right of the screen. Go me.</p></div>

<div id="left">
<p>This is the info on the left of the screen. Go me!</p></div>



Basically the {float: right;} and {float: left;} elements, combined with the "width: 50%" will do what you want. Page the above into a text file, save it as html, and view it in your favourite web browser.

I'm not quite sure if this is what you're asking for...but you might wanna check out this site. Good luck! :)

Haha that's kind of insulting, don't you think?

Eh...no, I don't think so. It's actually how I first learned HTML and CSS. I think it's excellent for beginners. And I wasn't sure if she was a beginner or not, that's why I said I wasn't sure if that was what she was asking for.

  • 1