Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Help creating HTML page with curved header section

I was wondering, what is the best way (using html, css, and graphics) to create a web page whose top header section appears to be beveled, as opposed to straight across? Please see the below image as an example:

alt text

I'm not sure how to use images in a way such that they would expand/contract in accordance with different browser sizes/resolutions...

Can anyone offer me some help? Or perhaps point me to a resource?

Thanks!

like image 487
littleK Avatar asked Mar 04 '26 12:03

littleK


2 Answers

You could use border-radius.

Example

See my example on jsFiddle.

like image 92
alex Avatar answered Mar 06 '26 02:03

alex


Mine is a cleaner version of @Alex's:

Live Demo

.head {
    -webkit-border-top-left-radius: 40% 80px;
    -webkit-border-top-right-radius: 40% 80px;
    -moz-border-radius-topleft: 40% 80px;
    -moz-border-radius-topright: 40% 80px;
    border-top-left-radius: 40% 80px;
    border-top-right-radius: 40% 80px;

    background: blue;
    height: 280px
}
<div class="head"></div>

It obviously won't work in IE.

like image 39
thirtydot Avatar answered Mar 06 '26 03:03

thirtydot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!