/    Sign up×
Community /Pin to ProfileBookmark

css page, right corner disappears

Hi everyone,
Here is the main html code i created:

[CODE]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>August70</title>
<link href=”page1/august1.css” media=”all” rel=”stylesheet” />
</head>
<body>
<div id=”upper_left”></div>
<div id=”upper_middle”></div>
<div id=”upper_right”></div>
</body>
</html>
[/CODE]

This is the: “page1/august1.css” I wrote:

[CODE]
body
{
text-align:center;
font: 1em Lucida, Arial, sans-serif;
}
* {margin:0;padding:0;}
div#upper_left
{
background-image:url(upper_left.gif);
background-repeat:no-repeat;
float:left;
width:10px;
height:10px;
border: 3px solid #F00;
}
div#upper_middle
{
background-color:#bb9c63;
/*float:left;*/
width:120px;
height:10px;
border:3px solid blue;
}
div#upper_right
{
background-image:url(upper_right.gif);
background-repeat:no-repeat;
width:150px;
height:10px;
border:3px solid magenta;
}
[/CODE]

At the page the browser loads (attached under the name “august1.gif”) the right corner graphic is located beneath the “left corner” graphic as seen at “august1.gif” attached.
I’d like the right corner to be located at the right side of the line so i remove the remark symbols from “div#upper_middle”. This time when i load the page the right corner is no more located beneath the “left_corner” graphic but it isn’t located at its right dise either, it disappears as seen at the attached screen shot (“august2.dif”).
Can anyone explain me please why did the right corner disappear ?
I would also like to ask another question: How do i locate that rounded corners line at the center of my page?
Thanks

[upl-file uuid=995e3a71-ecc0-4af3-8a50-33b238d07a88 size=376B]august1.gif[/upl-file]

[upl-file uuid=7516447f-4ea2-430e-94e9-66ca5ee1f5e2 size=269B]august2.gif[/upl-file]

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@tjedgarJan 11.2010 — this looks like it is due to your floats, there are 2 ways to do this. either use float:left on all three divs.

Or create a containing div with a set width and put a float:right on the right hand div
Copy linkTweet thisAlerts:
@ratterauthorJan 12.2010 — Thanks a lot tjedgar
Copy linkTweet thisAlerts:
@TancrediJan 14.2010 — The * selector should be at the top of the stack by the way.
Copy linkTweet thisAlerts:
@ratterauthorJan 15.2010 — The * selector should be at the top of the stack by the way.[/QUOTE]
assigned ?
Copy linkTweet thisAlerts:
@tjedgarJan 15.2010 — he means at the top of your stylesheet, otherwise it can overwrite any of the styles above it in the stylesheet
Copy linkTweet thisAlerts:
@ratterauthorJan 16.2010 — That makes sense.. Thanks, I'll do that at future.
×

Success!

Help @ratter spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...