Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Floating advice for CSS noob
Old 11-13-2010, 09:53 AM Floating advice for CSS noob
Junior Talker

Posts: 2
Name: Jon
Trades: 0
Hi everyone, im an 18 year old guy thats doing his first major HTML/CSS work. Basically im designing a basic website with not that much content, however I do want it to look clean and sleek.

My problem is with floating objects, it displays how I want it to in IE8 but not in firefox/chrome. The CSS is displayed below:

Quote:
body
img
{
float:right;
}

#content
{
float:left;
}

div

{
border: 4px solid gray;
padding: 0;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px
}

#content
{
font-family: Verdana;
size: Small;
border: 4px solid gray;
padding: 0;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px
}

#menu
ul {list-style: none;}
li {border: 4px solid gray;
font-family: Verdana;
size: Small;
display: inline;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;


That expert drawing above shows basically what I want, the text box inline with the picture.

Help much appreciated.
Jon11 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-13-2010, 11:03 AM Re: Floating advice for CSS noob
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
First, never use IE, any version, as your measurement of what is correct rendering, 99% of the time it is WRONG. Make it work in GOOD browsers, such as Firefox, Chrome or Safari, then kick IE into compliance as needed.

Next, when you float an element, you need to give it a width, images being an exception as long as the width and height are properly specified in the html.

Put your image INSIDE of the #content div, floated, and you'll get what you want, the photo to the right of the text. If you want to leave the image outside of the #content div, then you're going to have to specify a width for #content that is narrow enough to allow for the width of the image to the right.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-13-2010, 11:21 AM Re: Floating advice for CSS noob
Junior Talker

Posts: 2
Name: Jon
Trades: 0
Thanks for the quick response, ill give it a go.
Jon11 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Floating advice for CSS noob
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47834 seconds with 12 queries