define relative width using css

I

Ingo Griegert

Hope somebody can help me on this one:

I want to create a DIV that fills the entire width of the window except for
20px on the right. So no matter how wide the browser window is, there are
always exactly 20px next to my DIV that are empty.

20px right margin cannot be used, as there are other elements that will go
up to the right side of the window.

Sorry, might be a really easy answer, but I can't come up with it.

Any ideas? Thanks!
 
T

Toby A Inkster

Ingo said:
I want to create a DIV that fills the entire width of the window except for
20px on the right. So no matter how wide the browser window is, there are
always exactly 20px next to my DIV that are empty.

<div style="margin-right:20px;">
blah
</div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top