• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Getting rid of inline CSS

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please consider the following JSFiddle:

https://jsfiddle.net/mqnwepLo/5/


I'm trying to get rid of inline styling from the HTML code and put it inside CSS section. I want to get rid of `margin-left:30px` from the `ul` tag.

Di I need to define it like this?


 
Saloon Keeper
Posts: 2793
367
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Posting your markup for reference:
 
Ron McLeod
Saloon Keeper
Posts: 2793
367
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jack Tauson wrote:Di I need to define it like this?


I don't see where li is part of the descendancy (is that the correct term?).  Try removing it:
 
Ron McLeod
Saloon Keeper
Posts: 2793
367
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Proper indentation makes it more clear ...
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using this way :


Even i have updated your code do check in this link : https://jsfiddle.net/oec7xkLp/
 
Saloon Keeper
Posts: 21306
140
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sherin Mathew wrote:Try using this way :


Even i have updated your code do check in this link : https://jsfiddle.net/oec7xkLp/



I prefer indentation, myself:


For those who worry about the extra bandwidth: A) get rid of the auto-playing videos first (never mind, I closed the window the minute the noise started, bye-wont-be-back   ). B) You can always run a compactor on the source CSS when building the actual webapp.
 
mooooooo ..... tiny ad ....
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!