Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Floating in Static Blocks
 
Wombat
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2007-12-10
Somerset, UK
 

I’m a newbie on Magento and have manage to do most things, however, I’m stuck on one thing and wonder if anyone can help please?

I’m trying to write some static pages and want to add a few images.  Trouble is, when I try to float them right or left, it doesn’t seem to work.  I’ve added:

.floatright {
float: right;
margin: 0 0 0 10px;
}

.floatleft {
float: left;
margin: 0 10px 0 0;

}

to the custom CSS file and then class=’floatright’ in the image element, but it just ain’t happening.  I may be doing something totally blonde, but I’ve never had trouble getting floats to work before.  Any suggestions...?

 
Magento Community Magento Community
Magento Community
Magento Community
 
bmartus
Sr. Member
 
Total Posts:  128
Joined:  2008-05-22
Greenville, TX
 

Make sure custom.css is being included—check your HTML source, and if it’s not there add it to page.xml file

The default full path to page.xml is
app/design/frontend/default/default/layout/page.xml

 
Magento Community Magento Community
Magento Community
Magento Community
 
Wombat
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2007-12-10
Somerset, UK
 

Thank you, I’ll have a look at that

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lol
Member
 
Avatar
Total Posts:  68
Joined:  2008-06-26
Plymouth, UK
 

float left and right classes are already specified in the boxes (I think) css so just use those.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top